ivory-0.1.0.3: Safe embedded C programming.

Safe HaskellNone
LanguageHaskell2010

Ivory.Language.BitData.Array

Synopsis

Documentation

type family ArraySize n a :: Nat Source

data BitArray n a Source

An array of "n" bit data elements of type "a".

Constructors

BitArray 

Fields

unArray :: Bits (ArraySize n a)
 

Instances

(ANat n, ANat (ArraySize n a), BitData a, IvoryRep (BitRep (ArraySize n a))) => BitData (BitArray n a) Source 
type BitType (BitArray n a) = Bits (ArraySize n a) Source 

bitLength :: forall a n. ANat n => BitArray n a -> Int Source

Return the number of elements in a BitArray.

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

Return the "n"th element of a BitArray.

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

Return a BitDataField that accesses the "n"th element of a BitArray. This can be composed with other field accessors using "#>".