ivory-bitdata-0.2.0.0: Ivory bit-data support.

Safe HaskellNone

Ivory.BitData.Array

Synopsis

Documentation

type family ArraySize n a :: NatSource

data BitArray n a Source

An array of n bit data elements of type a.

Constructors

BitArray 

Fields

unArray :: Bits (ArraySize n a)
 

Instances

bitLength :: forall a n. SingI n => BitArray n a -> IntSource

Return the number of elements in a BitArray.

(#!) :: forall a n. (BitData a, SingI n, SingI (BitSize a), SingI (ArraySize n a), BitCast (BitRep (ArraySize n a)) (BitDataRep a), IvoryRep (BitRep (ArraySize n a))) => BitArray n a -> Int -> aSource

Return the nth element of a BitArray.

bitIx :: forall a n. (BitData a, SingI n, SingI (BitSize a), SingI (ArraySize n a)) => Int -> BitDataField (BitArray n a) aSource

Return a BitDataField that accesses the nth element of a BitArray. This can be composed with other field accessors using .