serialise-0.2.1.0: A binary serialisation library for Haskell values.

Copyright(c) Duncan Coutts 2015-2017
LicenseBSD3-style (see LICENSE.txt)
Maintainerduncan@community.haskell.org
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Codec.Serialise.Class

Contents

Description

The Serialise class allows you to encode a given type into a CBOR object, or decode a CBOR object into the user-specified type.

Synopsis

The Serialise class

class Serialise a where Source #

Types that are instances of the Serialise class allow values to be quickly encoded or decoded directly to a CBOR representation, for object transmission or storage.

Since: serialise-0.2.0.0

Methods

encode :: a -> Encoding Source #

Definition for encoding a given type into a binary representation, using the Encoding Monoid.

Since: serialise-0.2.0.0

encode :: (Generic a, GSerialiseEncode (Rep a)) => a -> Encoding Source #

Definition for encoding a given type into a binary representation, using the Encoding Monoid.

Since: serialise-0.2.0.0

decode :: Decoder s a Source #

Definition of a given Decoder for a type.

Since: serialise-0.2.0.0

decode :: (Generic a, GSerialiseDecode (Rep a)) => Decoder s a Source #

Definition of a given Decoder for a type.

Since: serialise-0.2.0.0

encodeList :: [a] -> Encoding Source #

Utility to support specialised encoding for some list type - used for Char/String instances in this package.

Since: serialise-0.2.0.0

decodeList :: Decoder s [a] Source #

Utility to support specialised decoding for some list type - used for Char/String instances in this package.

Since: serialise-0.2.0.0

Instances
Serialise Bool Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Char Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Double Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Float Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Int Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Int8 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Int16 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Int32 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Int64 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Integer Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Natural Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Ordering Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Word Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Word8 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Word16 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Word32 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Word64 Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise RuntimeRep Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise VecCount Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise VecElem Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise SomeTypeRep Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise () Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise TyCon Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise KindRep Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise TypeLitSort Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Version Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise ExitCode Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise All Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Any Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CChar Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CSChar Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUChar Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CShort Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUShort Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CInt Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUInt Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CLong Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CULong Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CLLong Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CULLong Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CFloat Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CDouble Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CPtrdiff Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CSize Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CWchar Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CSigAtomic Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CClock Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CTime Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUSeconds Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CSUSeconds Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CIntPtr Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUIntPtr Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CIntMax Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise CUIntMax Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Fingerprint Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise ShortByteString Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise ByteString Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise ByteString Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Text Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Term Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise IntSet Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Half Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise Text Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise UTCTime Source #

UTCTime is encoded using the extended time format which is currently in Internet Draft state, https://tools.ietf.org/html/draft-bormann-cbor-time-tag-00.

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise [a] Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: [a] -> Encoding Source #

decode :: Decoder s [a] Source #

encodeList :: [[a]] -> Encoding Source #

decodeList :: Decoder s [[a]] Source #

Serialise a => Serialise (Maybe a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Integral a) => Serialise (Ratio a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Complex a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise (Fixed e) Source #

Values are serialised in units of least precision represented as Integer.

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Min a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Max a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (First a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Last a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (WrappedMonoid a) Source # 
Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Option a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (ZipList a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Identity a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (First a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Last a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Dual a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Sum a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Product a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Down a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (NonEmpty a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (IntMap a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Tree a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Seq a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Ord a, Serialise a) => Serialise (Set a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Hashable a, Eq a) => Serialise (HashSet a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Unbox a) => Serialise (Vector a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Storable a) => Serialise (Vector a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Prim a) => Serialise (Vector a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => Serialise (Vector a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Serialise b) => Serialise (Either a b) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Typeable a => Serialise (TypeRep a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Serialise b) => Serialise (a, b) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b) -> Encoding Source #

decode :: Decoder s (a, b) Source #

encodeList :: [(a, b)] -> Encoding Source #

decodeList :: Decoder s [(a, b)] Source #

Serialise (Proxy a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Ord k, Serialise k, Serialise v) => Serialise (Map k v) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise k, Hashable k, Eq k, Serialise v) => Serialise (HashMap k v) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Serialise b, Serialise c) => Serialise (a, b, c) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c) -> Encoding Source #

decode :: Decoder s (a, b, c) Source #

encodeList :: [(a, b, c)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c)] Source #

Serialise a => Serialise (Const a b) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise (f a) => Serialise (Alt f a) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

(Serialise a, Serialise b, Serialise c, Serialise d) => Serialise (a, b, c, d) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d) -> Encoding Source #

decode :: Decoder s (a, b, c, d) Source #

encodeList :: [(a, b, c, d)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d)] Source #

(Serialise a, Serialise b, Serialise c, Serialise d, Serialise e) => Serialise (a, b, c, d, e) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d, e) -> Encoding Source #

decode :: Decoder s (a, b, c, d, e) Source #

encodeList :: [(a, b, c, d, e)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d, e)] Source #

(Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f) => Serialise (a, b, c, d, e, f) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d, e, f) -> Encoding Source #

decode :: Decoder s (a, b, c, d, e, f) Source #

encodeList :: [(a, b, c, d, e, f)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d, e, f)] Source #

(Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f, Serialise g) => Serialise (a, b, c, d, e, f, g) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d, e, f, g) -> Encoding Source #

decode :: Decoder s (a, b, c, d, e, f, g) Source #

encodeList :: [(a, b, c, d, e, f, g)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d, e, f, g)] Source #

(Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f, Serialise g, Serialise h) => Serialise (a, b, c, d, e, f, g, h) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d, e, f, g, h) -> Encoding Source #

decode :: Decoder s (a, b, c, d, e, f, g, h) Source #

encodeList :: [(a, b, c, d, e, f, g, h)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d, e, f, g, h)] Source #

(Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f, Serialise g, Serialise h, Serialise i) => Serialise (a, b, c, d, e, f, g, h, i) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

encode :: (a, b, c, d, e, f, g, h, i) -> Encoding Source #

decode :: Decoder s (a, b, c, d, e, f, g, h, i) Source #

encodeList :: [(a, b, c, d, e, f, g, h, i)] -> Encoding Source #

decodeList :: Decoder s [(a, b, c, d, e, f, g, h, i)] Source #

class GSerialiseEncode f where Source #

Since: serialise-0.2.0.0

Minimal complete definition

gencode

Methods

gencode :: f a -> Encoding Source #

Since: serialise-0.2.0.0

Instances
GSerialiseEncode (U1 :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: U1 a -> Encoding Source #

GSerialiseEncode (V1 :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: V1 a -> Encoding Source #

Serialise a => GSerialiseEncode (K1 i a :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: K1 i a a0 -> Encoding Source #

(GSerialiseProd f, GSerialiseProd g) => GSerialiseEncode (f :*: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: (f :*: g) a -> Encoding Source #

(GSerialiseSum f, GSerialiseSum g) => GSerialiseEncode (f :+: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: (f :+: g) a -> Encoding Source #

GSerialiseEncode a => GSerialiseEncode (M1 i c a :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gencode :: M1 i c a a0 -> Encoding Source #

class GSerialiseDecode f where Source #

Since: serialise-0.2.0.0

Minimal complete definition

gdecode

Methods

gdecode :: Decoder s (f a) Source #

Since: serialise-0.2.0.0

Instances
GSerialiseDecode (U1 :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s (U1 a) Source #

GSerialiseDecode (V1 :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s (V1 a) Source #

Serialise a => GSerialiseDecode (K1 i a :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s (K1 i a a0) Source #

(GSerialiseProd f, GSerialiseProd g) => GSerialiseDecode (f :*: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s ((f :*: g) a) Source #

(GSerialiseSum f, GSerialiseSum g) => GSerialiseDecode (f :+: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s ((f :+: g) a) Source #

GSerialiseDecode a => GSerialiseDecode (M1 i c a :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

gdecode :: Decoder s (M1 i c a a0) Source #

class GSerialiseProd f where Source #

Serialization of product types

Minimal complete definition

nFields, encodeSeq, gdecodeSeq

Methods

nFields :: Proxy f -> Word Source #

Number of fields in product type

encodeSeq :: f a -> Encoding Source #

Encode fields sequentially without writing header

gdecodeSeq :: Decoder s (f a) Source #

Decode fields sequentially without reading header

Instances
GSerialiseProd (U1 :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Serialise a => GSerialiseProd (K1 i a :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

nFields :: Proxy (K1 i a) -> Word Source #

encodeSeq :: K1 i a a0 -> Encoding Source #

gdecodeSeq :: Decoder s (K1 i a a0) Source #

(GSerialiseProd f, GSerialiseProd g) => GSerialiseProd (f :*: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

nFields :: Proxy (f :*: g) -> Word Source #

encodeSeq :: (f :*: g) a -> Encoding Source #

gdecodeSeq :: Decoder s ((f :*: g) a) Source #

(i ~ S, GSerialiseProd f) => GSerialiseProd (M1 i c f :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

nFields :: Proxy (M1 i c f) -> Word Source #

encodeSeq :: M1 i c f a -> Encoding Source #

gdecodeSeq :: Decoder s (M1 i c f a) Source #

class GSerialiseSum f where Source #

Serialization of sum types

Since: serialise-0.2.0.0

Methods

conNumber :: f a -> Word Source #

Number of constructor of given value

numOfFields :: f a -> Word Source #

Number of fields of given value

encodeSum :: f a -> Encoding Source #

Encode field

decodeSum :: Word -> Decoder s (f a) Source #

Decode field

nConstructors :: Proxy f -> Word Source #

Number of constructors

fieldsForCon :: Proxy f -> Word -> Decoder s Word Source #

Number of fields for given constructor number

Instances
(GSerialiseSum f, GSerialiseSum g) => GSerialiseSum (f :+: g :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

conNumber :: (f :+: g) a -> Word Source #

numOfFields :: (f :+: g) a -> Word Source #

encodeSum :: (f :+: g) a -> Encoding Source #

decodeSum :: Word -> Decoder s ((f :+: g) a) Source #

nConstructors :: Proxy (f :+: g) -> Word Source #

fieldsForCon :: Proxy (f :+: g) -> Word -> Decoder s Word Source #

(i ~ C, GSerialiseProd f) => GSerialiseSum (M1 i c f :: k -> *) Source #

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

Methods

conNumber :: M1 i c f a -> Word Source #

numOfFields :: M1 i c f a -> Word Source #

encodeSum :: M1 i c f a -> Encoding Source #

decodeSum :: Word -> Decoder s (M1 i c f a) Source #

nConstructors :: Proxy (M1 i c f) -> Word Source #

fieldsForCon :: Proxy (M1 i c f) -> Word -> Decoder s Word Source #

encodeVector :: (Serialise a, Vector v a) => v a -> Encoding Source #

Generic encoder for vectors. Its intended use is to allow easy definition of Serialise instances for custom vector

Since: serialise-0.2.0.0

decodeVector :: (Serialise a, Vector v a) => Decoder s (v a) Source #

Generic decoder for vectors. Its intended use is to allow easy definition of Serialise instances for custom vector

Since: serialise-0.2.0.0