dahdit-0.6.0: Binary parsing and serialization with integrated size
Safe HaskellSafe-Inferred
LanguageHaskell2010

Dahdit.Binary

Documentation

class Binary a where Source #

Minimal complete definition

get, put

Methods

byteSize :: a -> ByteCount Source #

get :: Get a Source #

put :: a -> Put Source #

Instances

Instances details
Binary Int16 Source # 
Instance details

Defined in Dahdit.Binary

Binary Int32 Source # 
Instance details

Defined in Dahdit.Binary

Binary Int64 Source # 
Instance details

Defined in Dahdit.Binary

Binary Int8 Source # 
Instance details

Defined in Dahdit.Binary

Binary Word16 Source # 
Instance details

Defined in Dahdit.Binary

Binary Word32 Source # 
Instance details

Defined in Dahdit.Binary

Binary Word64 Source # 
Instance details

Defined in Dahdit.Binary

Binary Word8 Source # 
Instance details

Defined in Dahdit.Binary

Binary IntSet Source # 
Instance details

Defined in Dahdit.Binary

Binary BoolByte Source # 
Instance details

Defined in Dahdit.Fancy

Binary TermBytes16 Source # 
Instance details

Defined in Dahdit.Fancy

Binary TermBytes8 Source # 
Instance details

Defined in Dahdit.Fancy

Binary DoubleBE Source # 
Instance details

Defined in Dahdit.Binary

Binary DoubleLE Source # 
Instance details

Defined in Dahdit.Binary

Binary FloatBE Source # 
Instance details

Defined in Dahdit.Binary

Binary FloatLE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int16BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int16LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int24BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int24LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int32BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int32LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int64BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int64LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word16BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word16LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word24BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word24LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word32BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word32LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word64BE Source # 
Instance details

Defined in Dahdit.Binary

Binary Word64LE Source # 
Instance details

Defined in Dahdit.Binary

Binary Int24 Source # 
Instance details

Defined in Dahdit.Binary

Binary Word24 Source # 
Instance details

Defined in Dahdit.Binary

Binary () Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: () -> ByteCount Source #

get :: Get () Source #

put :: () -> Put Source #

Binary Bool Source # 
Instance details

Defined in Dahdit.Binary

Binary Char Source # 
Instance details

Defined in Dahdit.Binary

Binary Double Source # 
Instance details

Defined in Dahdit.Binary

Binary Float Source # 
Instance details

Defined in Dahdit.Binary

Binary Int Source # 
Instance details

Defined in Dahdit.Binary

Binary v => Binary (IntMap v) Source # 
Instance details

Defined in Dahdit.Binary

Binary a => Binary (Seq a) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: Seq a -> ByteCount Source #

get :: Get (Seq a) Source #

put :: Seq a -> Put Source #

Binary a => Binary (Set a) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: Set a -> ByteCount Source #

get :: Get (Set a) Source #

put :: Set a -> Put Source #

KnownNat n => Binary (StaticBytes n) Source # 
Instance details

Defined in Dahdit.Fancy

(Generic t, GByteSized (Rep t), GBinary (Rep t)) => Binary (ViaGeneric t) Source # 
Instance details

Defined in Dahdit.Generic

(Generic t, GStaticByteSized (Rep t), GBinary (Rep t)) => Binary (ViaStaticGeneric t) Source # 
Instance details

Defined in Dahdit.Generic

Binary a => Binary (Maybe a) Source # 
Instance details

Defined in Dahdit.Binary

Binary a => Binary [a] Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: [a] -> ByteCount Source #

get :: Get [a] Source #

put :: [a] -> Put Source #

(Binary b, Binary a) => Binary (Either b a) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: Either b a -> ByteCount Source #

get :: Get (Either b a) Source #

put :: Either b a -> Put Source #

(Binary k, Binary v) => Binary (Map k v) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: Map k v -> ByteCount Source #

get :: Get (Map k v) Source #

put :: Map k v -> Put Source #

BinaryRep x a => Binary (ViaBinaryRep x a) Source # 
Instance details

Defined in Dahdit.BinaryRep

(SymLen n s, KnownSymbol s, KnownNat n) => Binary (ExactBytes n s) Source # 
Instance details

Defined in Dahdit.Fancy

(KnownNat n, LiftedPrim a, Default a) => Binary (StaticArray n a) Source # 
Instance details

Defined in Dahdit.Fancy

(KnownNat n, Binary a, StaticByteSized a, Default a) => Binary (StaticSeq n a) Source # 
Instance details

Defined in Dahdit.Fancy

(Binary a, Binary b) => Binary (a, b) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: (a, b) -> ByteCount Source #

get :: Get (a, b) Source #

put :: (a, b) -> Put Source #

(Binary a, Binary b, Binary c) => Binary (a, b, c) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: (a, b, c) -> ByteCount Source #

get :: Get (a, b, c) Source #

put :: (a, b, c) -> Put Source #

(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: (a, b, c, d) -> ByteCount Source #

get :: Get (a, b, c, d) Source #

put :: (a, b, c, d) -> Put Source #

(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) Source # 
Instance details

Defined in Dahdit.Binary

Methods

byteSize :: (a, b, c, d, e) -> ByteCount Source #

get :: Get (a, b, c, d, e) Source #

put :: (a, b, c, d, e) -> Put Source #