Represent the accessor for types that can be stored in the UArray and MUArray.
Types need to be a instance of storable and have fixed sized.
Methods
primSizeInBytes :: Proxy ty -> CountOf Word8get the size in bytes of a ty element
primShiftToBytes :: Proxy ty -> Intget the shift size
primBaUIndex :: ByteArray# -> Offset ty -> tyreturn the element stored at a specific index
primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset ty -> prim tyRead an element at an index in a mutable array
primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset ty -> ty -> prim ()Write an element to a specific cell in a mutable array.
primAddrIndex :: Addr# -> Offset ty -> tyRead from Address, without a state. the value read should be considered a constant for all pratical purpose, otherwise bad thing will happens.
primAddrRead :: PrimMonad prim => Addr# -> Offset ty -> prim tyRead a value from Addr in a specific primitive monad
primAddrWrite :: PrimMonad prim => Addr# -> Offset ty -> ty -> prim ()Write a value to Addr in a specific primitive monad
Instances20PrimType, …
PrimType Char7Defined in basement-0.0.16 · Basement.PrimTypePrimType Word128Defined in basement-0.0.16 · Basement.PrimTypePrimType Word256Defined in basement-0.0.16 · Basement.PrimTypePrimType CCharDefined in basement-0.0.16 · Basement.PrimTypePrimType CUCharDefined in basement-0.0.16 · Basement.PrimTypePrimType Int16Defined in basement-0.0.16 · Basement.PrimTypePrimType Int32Defined in basement-0.0.16 · Basement.PrimTypePrimType Int64Defined in basement-0.0.16 · Basement.PrimTypePrimType Int8Defined in basement-0.0.16 · Basement.PrimTypePrimType Word16Defined in basement-0.0.16 · Basement.PrimTypePrimType Word32Defined in basement-0.0.16 · Basement.PrimTypePrimType Word64Defined in basement-0.0.16 · Basement.PrimTypePrimType Word8Defined in basement-0.0.16 · Basement.PrimTypePrimType CharDefined in basement-0.0.16 · Basement.PrimTypePrimType DoubleDefined in basement-0.0.16 · Basement.PrimTypePrimType FloatDefined in basement-0.0.16 · Basement.PrimTypePrimType IntDefined in basement-0.0.16 · Basement.PrimTypePrimType WordDefined in basement-0.0.16 · Basement.PrimTypePrimType a => PrimType (BE a)Defined in basement-0.0.16 · Basement.PrimTypePrimType a => PrimType (LE a)Defined in basement-0.0.16 · Basement.PrimType