Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
class
Serialise
a
where
- encode :: a -> Encoding
- decode :: Decoder s a
- encodeList :: [a] -> Encoding
- decodeList :: Decoder s [a]
- prop_serialise :: ( Serialise a, Eq a, Show a) => a -> Property
- prop_serialise_valid :: Serialise a => a -> Property
- prop_serialise_roundtrip :: ( Serialise a, Eq a, Show a) => a -> Property
Class
class Serialise a where Source #
Types that are instances of the
class allow values
to be quickly encoded or decoded directly to a CBOR representation,
for object transmission or storage.
Serialise
Since: serialise-0.2.0.0
Nothing
encode :: 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
for a type.
Decoder
Since: serialise-0.2.0.0
encodeList :: [a] -> Encoding Source #
Utility to support specialised encoding for some list type -
used for
/
Char
instances in this package.
String
Since: serialise-0.2.0.0
decodeList :: Decoder s [a] Source #
Instances
Serialise Bool |
Since: serialise-0.2.0.0 |
Serialise Char |
Since: serialise-0.2.0.0 |
Serialise Double |
Since: serialise-0.2.0.0 |
Serialise Float |
Since: serialise-0.2.0.0 |
Serialise Int |
Since: serialise-0.2.0.0 |
Serialise Int8 |
Since: serialise-0.2.0.0 |
Serialise Int16 |
Since: serialise-0.2.0.0 |
Serialise Int32 |
Since: serialise-0.2.0.0 |
Serialise Int64 |
Since: serialise-0.2.0.0 |
Serialise Integer |
Since: serialise-0.2.0.0 |
Serialise Natural |
Since: serialise-0.2.0.0 |
Serialise Ordering |
Since: serialise-0.2.0.0 |
Serialise Word |
Since: serialise-0.2.0.0 |
Serialise Word8 |
Since: serialise-0.2.0.0 |
Serialise Word16 |
Since: serialise-0.2.0.0 |
Serialise Word32 |
Since: serialise-0.2.0.0 |
Serialise Word64 |
Since: serialise-0.2.0.0 |
Serialise RuntimeRep |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: RuntimeRep -> Encoding Source # decode :: Decoder s RuntimeRep Source # encodeList :: [ RuntimeRep ] -> Encoding Source # decodeList :: Decoder s [ RuntimeRep ] Source # |
|
Serialise VecCount |
Since: serialise-0.2.0.0 |
Serialise VecElem |
Since: serialise-0.2.0.0 |
Serialise SomeTypeRep |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: SomeTypeRep -> Encoding Source # decode :: Decoder s SomeTypeRep Source # encodeList :: [ SomeTypeRep ] -> Encoding Source # decodeList :: Decoder s [ SomeTypeRep ] Source # |
|
Serialise () |
Since: serialise-0.2.0.0 |
Serialise TyCon |
Since: serialise-0.2.0.0 |
Serialise KindRep |
Since: serialise-0.2.0.0 |
Serialise TypeLitSort |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: TypeLitSort -> Encoding Source # decode :: Decoder s TypeLitSort Source # encodeList :: [ TypeLitSort ] -> Encoding Source # decodeList :: Decoder s [ TypeLitSort ] Source # |
|
Serialise Version |
Since: serialise-0.2.0.0 |
Serialise ByteString |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: ByteString -> Encoding Source # decode :: Decoder s ByteString Source # encodeList :: [ ByteString ] -> Encoding Source # decodeList :: Decoder s [ ByteString ] Source # |
|
Serialise ByteString |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: ByteString -> Encoding Source # decode :: Decoder s ByteString Source # encodeList :: [ ByteString ] -> Encoding Source # decodeList :: Decoder s [ ByteString ] Source # |
|
Serialise UTCTime |
Since: serialise-0.2.0.0 |
Serialise Text |
Since: serialise-0.2.0.0 |
Serialise Text |
Since: serialise-0.2.0.0 |
Serialise Void |
Since: serialise-0.2.4.0 |
Serialise ExitCode |
Since: serialise-0.2.0.0 |
Serialise All |
Since: serialise-0.2.0.0 |
Serialise Any |
Since: serialise-0.2.0.0 |
Serialise CChar |
Since: serialise-0.2.0.0 |
Serialise CSChar |
Since: serialise-0.2.0.0 |
Serialise CUChar |
Since: serialise-0.2.0.0 |
Serialise CShort |
Since: serialise-0.2.0.0 |
Serialise CUShort |
Since: serialise-0.2.0.0 |
Serialise CInt |
Since: serialise-0.2.0.0 |
Serialise CUInt |
Since: serialise-0.2.0.0 |
Serialise CLong |
Since: serialise-0.2.0.0 |
Serialise CULong |
Since: serialise-0.2.0.0 |
Serialise CLLong |
Since: serialise-0.2.0.0 |
Serialise CULLong |
Since: serialise-0.2.0.0 |
Serialise CFloat |
Since: serialise-0.2.0.0 |
Serialise CDouble |
Since: serialise-0.2.0.0 |
Serialise CPtrdiff |
Since: serialise-0.2.0.0 |
Serialise CSize |
Since: serialise-0.2.0.0 |
Serialise CWchar |
Since: serialise-0.2.0.0 |
Serialise CSigAtomic |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: CSigAtomic -> Encoding Source # decode :: Decoder s CSigAtomic Source # encodeList :: [ CSigAtomic ] -> Encoding Source # decodeList :: Decoder s [ CSigAtomic ] Source # |
|
Serialise CClock |
Since: serialise-0.2.0.0 |
Serialise CTime |
Since: serialise-0.2.0.0 |
Serialise CUSeconds |
Since: serialise-0.2.0.0 |
Serialise CSUSeconds |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: CSUSeconds -> Encoding Source # decode :: Decoder s CSUSeconds Source # encodeList :: [ CSUSeconds ] -> Encoding Source # decodeList :: Decoder s [ CSUSeconds ] Source # |
|
Serialise CIntPtr |
Since: serialise-0.2.0.0 |
Serialise CUIntPtr |
Since: serialise-0.2.0.0 |
Serialise CIntMax |
Since: serialise-0.2.0.0 |
Serialise CUIntMax |
Since: serialise-0.2.0.0 |
Serialise Fingerprint |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: Fingerprint -> Encoding Source # decode :: Decoder s Fingerprint Source # encodeList :: [ Fingerprint ] -> Encoding Source # decodeList :: Decoder s [ Fingerprint ] Source # |
|
Serialise ShortByteString |
Since: serialise-0.2.0.0 |
Defined in Codec.Serialise.Class encode :: ShortByteString -> Encoding Source # decode :: Decoder s ShortByteString Source # encodeList :: [ ShortByteString ] -> Encoding Source # decodeList :: Decoder s [ ShortByteString ] Source # |
|
Serialise Term |
Since: serialise-0.2.0.0 |
Serialise IntSet |
Since: serialise-0.2.0.0 |
Serialise Half |
Since: serialise-0.2.0.0 |
Serialise a => Serialise [a] |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Maybe a) |
Since: serialise-0.2.0.0 |
( Serialise a, Integral a) => Serialise ( Ratio a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Complex a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Min a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Max a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( First a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Last a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( WrappedMonoid a) | |
Defined in Codec.Serialise.Class encode :: WrappedMonoid a -> Encoding Source # decode :: Decoder s ( WrappedMonoid a) Source # encodeList :: [ WrappedMonoid a] -> Encoding Source # decodeList :: Decoder s [ WrappedMonoid a] Source # |
|
Serialise a => Serialise ( Option a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( ZipList a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Identity a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( First a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Last a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Dual a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Sum a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Product a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Down a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( NonEmpty a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( IntMap a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Tree a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Seq a) |
Since: serialise-0.2.0.0 |
( Ord a, Serialise a) => Serialise ( Set a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Maybe a) |
Since: serialise-0.2.4.0 |
( Serialise a, Hashable a, Eq a) => Serialise ( HashSet a) |
Since: serialise-0.2.0.0 |
( Serialise a, Unbox a) => Serialise ( Vector a) |
Since: serialise-0.2.0.0 |
( Serialise a, Storable a) => Serialise ( Vector a) |
Since: serialise-0.2.0.0 |
( Serialise a, Prim a) => Serialise ( Vector a) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Vector a) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b) => Serialise ( Either a b) |
Since: serialise-0.2.0.0 |
Typeable a => Serialise ( TypeRep a) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b) => Serialise (a, b) |
Since: serialise-0.2.0.0 |
( Ord k, Serialise k, Serialise v) => Serialise ( Map k v) |
Since: serialise-0.2.0.0 |
( Serialise k, Hashable k, Eq k, Serialise v) => Serialise ( HashMap k v) |
Since: serialise-0.2.0.0 |
Serialise ( Fixed e) |
Values are serialised in units of least precision represented as
Since: serialise-0.2.0.0 |
Serialise ( Proxy a) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b) => Serialise ( These a b) |
Since: serialise-0.2.4.0 |
( Serialise a, Serialise b) => Serialise ( Pair a b) |
Since: serialise-0.2.4.0 |
( Serialise a, Serialise b) => Serialise ( These a b) |
Since: serialise-0.2.4.0 |
( Serialise a, Serialise b) => Serialise ( Either a b) |
Since: serialise-0.2.4.0 |
( Serialise a, Serialise b, Serialise c) => Serialise (a, b, c) |
Since: serialise-0.2.0.0 |
Serialise a => Serialise ( Const a b) |
Since: serialise-0.2.0.0 |
Serialise (f a) => Serialise ( Alt f a) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b, Serialise c, Serialise d) => Serialise (a, b, c, d) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b, Serialise c, Serialise d, Serialise e) => Serialise (a, b, c, d, e) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f) => Serialise (a, b, c, d, e, f) |
Since: serialise-0.2.0.0 |
( Serialise a, Serialise b, Serialise c, Serialise d, Serialise e, Serialise f, Serialise g) => Serialise (a, b, c, d, e, f, g) |
Since: serialise-0.2.0.0 |
( 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) |
Since: serialise-0.2.0.0 |
( 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) |
Since: serialise-0.2.0.0 |
prop_serialise_valid :: Serialise a => a -> Property Source #