ribosome-host-0.9.9.9: Neovim plugin host for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Host.Class.Msgpack.Error

Description

Errors for messagepack decoding.

Synopsis

Documentation

data FieldError Source #

A decoding error in a field of a larger type.

May be nested arbitrarily deep.

Instances

Instances details
IsString FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

Generic FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

Associated Types

type Rep FieldError :: Type -> Type #

Show FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

Eq FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

MsgpackDecode FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Decode

MsgpackEncode FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Encode

type Rep FieldError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

type Rep FieldError = D1 ('MetaData "FieldError" "Ribosome.Host.Class.Msgpack.Error" "ribosome-host-0.9.9.9-4n86eC1033RAA2pmC2T1m9" 'False) (C1 ('MetaCons "FieldError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "NestedFieldError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DecodeError)))

data DecodeError Source #

A messagepack decoding error.

Constructors

DecodeError 

Fields

Instances

Instances details
Generic DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

Associated Types

type Rep DecodeError :: Type -> Type #

Show DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

Eq DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

MsgpackDecode DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Decode

MsgpackEncode DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Encode

Reportable DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

type Rep DecodeError Source # 
Instance details

Defined in Ribosome.Host.Class.Msgpack.Error

type Rep DecodeError = D1 ('MetaData "DecodeError" "Ribosome.Host.Class.Msgpack.Error" "ribosome-host-0.9.9.9-4n86eC1033RAA2pmC2T1m9" 'False) (C1 ('MetaCons "DecodeError" 'PrefixI 'True) (S1 ('MetaSel ('Just "mainType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "fieldError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldError)))

renderError :: DecodeError -> Text Source #

Create a user-friendly message for a DecodeError.

toDecodeError :: forall a. Typeable a => Either FieldError a -> Either DecodeError a Source #

Convert a FieldError in a Left to a DecodeError by adding the type name via Typeable.

decodeError :: forall a. Typeable a => Text -> Either DecodeError a Source #

Create a Left DecodeError from a Text by adding the type name via Typeable.

incompatible :: forall a. Typeable a => Object -> Either FieldError a Source #

Create a FieldError for a field when the Object constructor is wrong, using Typeable to obtain the type name.

decodeIncompatible :: forall a. Typeable a => Object -> Either DecodeError a Source #

Create a DecodeError for a type when the Object constructor is wrong, using Typeable to obtain the type name.