binrep-0.2.0: Encode precise binary representations directly in types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Binrep.CBLen

Synopsis

Documentation

type family CBLen a :: Natural Source #

The length in bytes of any value of the given type is constant.

Many binary representation primitives are constant, or store their size in their type. This is a stronger statement about their length than BLen.

Instances

Instances details
type CBLen Int16 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Int16 = 2
type CBLen Int32 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Int32 = 4
type CBLen Int64 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Int64 = 8
type CBLen Int8 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Int8 = 1
type CBLen Word16 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Word16 = 2
type CBLen Word32 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Word32 = 4
type CBLen Word64 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Word64 = 8
type CBLen Word8 Source # 
Instance details

Defined in Binrep.CBLen

type CBLen Word8 = 1
type CBLen DCS Source # 
Instance details

Defined in Binrep.Example

type CBLen DSS Source # 
Instance details

Defined in Binrep.Example

type CBLen DU Source # 
Instance details

Defined in Binrep.Example

type CBLen DU = CBLenGeneric (I 'U 'I1 'LE) DU
type CBLen DX Source # 
Instance details

Defined in Binrep.Example

type CBLen DX = CBLenGeneric (I 'U 'I1 'LE) DX
type CBLen (TarNat n) Source # 
Instance details

Defined in Binrep.Example.Tar

type CBLen (TarNat n) = n
type CBLen (Magic a) Source #

Assumes magic values are individual bytes.

Instance details

Defined in Binrep.Type.Magic

type CBLen (Magic a) = Length (MagicVals a)
type CBLen (NullPadded n a) Source #

The size of some null-padded data is known - at compile time!

Instance details

Defined in Binrep.Type.NullPadded

type CBLen (NullPadded n a) = n
type CBLen (Sized n a) Source # 
Instance details

Defined in Binrep.Type.Sized

type CBLen (Sized n a) = n
type CBLen (Vector n a) Source # 
Instance details

Defined in Binrep.Type.Vector

type CBLen (Vector n a) = CBLen a * n
type CBLen (I sign size end) Source # 
Instance details

Defined in Binrep.Type.Int

type CBLen (I sign size end) = CBLen (IRep sign size)