Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class EncodeRecord (fields :: [FieldInfo]) (as :: [Type]) where
- encodeRecord :: NP I as -> [(Object, Object)]
- class EncodeCtor (ctor :: ConstructorInfo) (as :: [Type]) where
- encodeCtor :: NP I as -> Object
- class EncodeCtors (ctors :: [ConstructorInfo]) (ass :: [[Type]]) where
- encodeCtors :: NS (NP I) ass -> Object
- class GMsgpackEncode (dt :: DatatypeInfo) (ass :: [[Type]]) where
- gtoMsgpack :: SOP I ass -> Object
- class MsgpackEncode a where
Documentation
class EncodeRecord (fields :: [FieldInfo]) (as :: [Type]) where Source #
Instances
EncodeRecord ('[] :: [FieldInfo]) ('[] :: [Type]) Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode | |
(KnownSymbol name, MsgpackEncode a, EncodeRecord fields as) => EncodeRecord ('FieldInfo name ': fields) (a ': as) Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode |
class EncodeCtor (ctor :: ConstructorInfo) (as :: [Type]) where Source #
Instances
All MsgpackEncode as => EncodeCtor ('Constructor name) as Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode | |
EncodeRecord fields as => EncodeCtor ('Record name fields) as Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode |
class EncodeCtors (ctors :: [ConstructorInfo]) (ass :: [[Type]]) where Source #
Instances
(EncodeCtor ctor as, EncodeCtors (ctor1 ': ctors) ass) => EncodeCtors (ctor ': (ctor1 ': ctors)) (as ': ass) Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode | |
EncodeCtor ctor as => EncodeCtors '[ctor] '[as] Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode |
class GMsgpackEncode (dt :: DatatypeInfo) (ass :: [[Type]]) where Source #
Instances
MsgpackEncode a => GMsgpackEncode ('Newtype mod name ctor) '['[a]] Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode | |
EncodeCtors ctors ass => GMsgpackEncode ('ADT mod name ctors strictness) ass Source # | |
Defined in Ribosome.Host.Class.Msgpack.Encode |
class MsgpackEncode a where Source #
Class of values that can be encoded to MessagePack Object
s.
Nothing
toMsgpack :: a -> Object Source #
Encode a value to MessagePack.
The default implementation uses generic derivation.
default toMsgpack :: ConstructSOP a ass => GMsgpackEncode (GDatatypeInfoOf a) (GCode a) => a -> Object Source #