basement-0.0.16: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.PrimType

Synopsis

- class Eq ty => PrimType ty where
  - type PrimSize ty :: Nat
  - primSizeInBytes :: Proxy ty -> CountOf Word8
  - primShiftToBytes :: Proxy ty -> Int
  - primBaUIndex :: ByteArray# -> Offset ty -> ty
  - primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset ty -> prim ty
  - primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset ty -> ty -> prim ()
  - primAddrIndex :: Addr# -> Offset ty -> ty
  - primAddrRead :: PrimMonad prim => Addr# -> Offset ty -> prim ty
  - primAddrWrite :: PrimMonad prim => Addr# -> Offset ty -> ty -> prim ()
- class PrimMemoryComparable ty
- primBaIndex :: PrimType ty => ByteArray# -> Offset ty -> ty
- primMbaRead :: (PrimType ty, PrimMonad prim) => MutableByteArray# (PrimState prim) -> Offset ty -> prim ty
- primMbaWrite :: (PrimType ty, PrimMonad prim) => MutableByteArray# (PrimState prim) -> Offset ty -> ty -> prim ()
- primArrayIndex :: Array# ty -> Offset ty -> ty
- primMutableArrayRead :: PrimMonad prim => MutableArray# (PrimState prim) ty -> Offset ty -> prim ty
- primMutableArrayWrite :: PrimMonad prim => MutableArray# (PrimState prim) ty -> Offset ty -> ty -> prim ()
- primOffsetOfE :: PrimType a => Offset a -> Offset Word8
- primOffsetRecast :: (PrimType a, PrimType b) => Offset a -> Offset b
- sizeRecast :: (PrimType a, PrimType b) => CountOf a -> CountOf b
- offsetAsSize :: Offset a -> CountOf a
- sizeAsOffset :: CountOf a -> Offset a
- sizeInBytes :: PrimType a => CountOf a -> CountOf Word8
- offsetInBytes :: PrimType a => Offset a -> Offset Word8
- offsetInElements :: PrimType a => Offset Word8 -> Offset a
- offsetIsAligned :: PrimType a => Proxy a -> Offset Word8 -> Bool
- primWordGetByteAndShift :: Word# -> (# Word#, Word# #)
- primWord64GetByteAndShift :: Word# -> (# Word#, Word# #)
- primWord64GetHiLo :: Word# -> (# Word#, Word# #)

# Documentation

class Eq ty => PrimType ty where #

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.

Associated Types

type PrimSize ty :: Nat #

type level size of the given `ty`

Methods

primSizeInBytes :: Proxy ty -> CountOf Word8 #

get the size in bytes of a ty element

primShiftToBytes :: Proxy ty -> Int #

get the shift size

primBaUIndex :: ByteArray# -> Offset ty -> ty #

return the element stored at a specific index

primMbaURead #

Arguments

:: PrimMonad prim |
=> MutableByteArray# (PrimState prim) | mutable array to read from
-> Offset ty | index of the element to retrieve
-> prim ty | the element returned

Read an element at an index in a mutable array

primMbaUWrite #

Arguments

:: PrimMonad prim |
=> MutableByteArray# (PrimState prim) | mutable array to modify
-> Offset ty | index of the element to modify
-> ty | the new value to store
-> prim () |

Write an element to a specific cell in a mutable array.

primAddrIndex :: Addr# -> Offset ty -> ty #

Read 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 ty #

Read 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

#### Instances

Instances details

PrimType Char7 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char7 |
Instance details Defined in Basement.PrimType type PrimSize Char7 = 1
Methods primSizeInBytes :: Proxy Char7 -> CountOf Word8 # primShiftToBytes :: Proxy Char7 -> Int # primBaUIndex :: ByteArray# -> Offset Char7 -> Char7 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> prim Char7 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> Char7 -> prim () # primAddrIndex :: Addr# -> Offset Char7 -> Char7 # primAddrRead :: PrimMonad prim => Addr# -> Offset Char7 -> prim Char7 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char7 -> Char7 -> prim () #
PrimType Word128 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word128 |
Instance details Defined in Basement.PrimType type PrimSize Word128 = 16
Methods primSizeInBytes :: Proxy Word128 -> CountOf Word8 # primShiftToBytes :: Proxy Word128 -> Int # primBaUIndex :: ByteArray# -> Offset Word128 -> Word128 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> prim Word128 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> Word128 -> prim () # primAddrIndex :: Addr# -> Offset Word128 -> Word128 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word128 -> prim Word128 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word128 -> Word128 -> prim () #
PrimType Word256 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32
Methods primSizeInBytes :: Proxy Word256 -> CountOf Word8 # primShiftToBytes :: Proxy Word256 -> Int # primBaUIndex :: ByteArray# -> Offset Word256 -> Word256 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> prim Word256 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> Word256 -> prim () # primAddrIndex :: Addr# -> Offset Word256 -> Word256 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word256 -> prim Word256 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word256 -> Word256 -> prim () #
PrimType CChar # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize CChar |
Instance details Defined in Basement.PrimType type PrimSize CChar = 1
Methods primSizeInBytes :: Proxy CChar -> CountOf Word8 # primShiftToBytes :: Proxy CChar -> Int # primBaUIndex :: ByteArray# -> Offset CChar -> CChar # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> prim CChar # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> CChar -> prim () # primAddrIndex :: Addr# -> Offset CChar -> CChar # primAddrRead :: PrimMonad prim => Addr# -> Offset CChar -> prim CChar # primAddrWrite :: PrimMonad prim => Addr# -> Offset CChar -> CChar -> prim () #
PrimType CUChar # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize CUChar |
Instance details Defined in Basement.PrimType type PrimSize CUChar = 1
Methods primSizeInBytes :: Proxy CUChar -> CountOf Word8 # primShiftToBytes :: Proxy CUChar -> Int # primBaUIndex :: ByteArray# -> Offset CUChar -> CUChar # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> prim CUChar # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> CUChar -> prim () # primAddrIndex :: Addr# -> Offset CUChar -> CUChar # primAddrRead :: PrimMonad prim => Addr# -> Offset CUChar -> prim CUChar # primAddrWrite :: PrimMonad prim => Addr# -> Offset CUChar -> CUChar -> prim () #
PrimType Int16 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int16 |
Instance details Defined in Basement.PrimType type PrimSize Int16 = 2
Methods primSizeInBytes :: Proxy Int16 -> CountOf Word8 # primShiftToBytes :: Proxy Int16 -> Int # primBaUIndex :: ByteArray# -> Offset Int16 -> Int16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> prim Int16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> Int16 -> prim () # primAddrIndex :: Addr# -> Offset Int16 -> Int16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int16 -> prim Int16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int16 -> Int16 -> prim () #
PrimType Int32 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int32 |
Instance details Defined in Basement.PrimType type PrimSize Int32 = 4
Methods primSizeInBytes :: Proxy Int32 -> CountOf Word8 # primShiftToBytes :: Proxy Int32 -> Int # primBaUIndex :: ByteArray# -> Offset Int32 -> Int32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> prim Int32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> Int32 -> prim () # primAddrIndex :: Addr# -> Offset Int32 -> Int32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int32 -> prim Int32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int32 -> Int32 -> prim () #
PrimType Int64 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int64 |
Instance details Defined in Basement.PrimType type PrimSize Int64 = 8
Methods primSizeInBytes :: Proxy Int64 -> CountOf Word8 # primShiftToBytes :: Proxy Int64 -> Int # primBaUIndex :: ByteArray# -> Offset Int64 -> Int64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> prim Int64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> Int64 -> prim () # primAddrIndex :: Addr# -> Offset Int64 -> Int64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int64 -> prim Int64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int64 -> Int64 -> prim () #
PrimType Int8 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int8 |
Instance details Defined in Basement.PrimType type PrimSize Int8 = 1
Methods primSizeInBytes :: Proxy Int8 -> CountOf Word8 # primShiftToBytes :: Proxy Int8 -> Int # primBaUIndex :: ByteArray# -> Offset Int8 -> Int8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> prim Int8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> Int8 -> prim () # primAddrIndex :: Addr# -> Offset Int8 -> Int8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Int8 -> prim Int8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int8 -> Int8 -> prim () #
PrimType Word16 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word16 |
Instance details Defined in Basement.PrimType type PrimSize Word16 = 2
Methods primSizeInBytes :: Proxy Word16 -> CountOf Word8 # primShiftToBytes :: Proxy Word16 -> Int # primBaUIndex :: ByteArray# -> Offset Word16 -> Word16 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> prim Word16 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> Word16 -> prim () # primAddrIndex :: Addr# -> Offset Word16 -> Word16 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word16 -> prim Word16 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word16 -> Word16 -> prim () #
PrimType Word32 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word32 |
Instance details Defined in Basement.PrimType type PrimSize Word32 = 4
Methods primSizeInBytes :: Proxy Word32 -> CountOf Word8 # primShiftToBytes :: Proxy Word32 -> Int # primBaUIndex :: ByteArray# -> Offset Word32 -> Word32 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> prim Word32 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> Word32 -> prim () # primAddrIndex :: Addr# -> Offset Word32 -> Word32 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word32 -> prim Word32 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word32 -> Word32 -> prim () #
PrimType Word64 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word64 |
Instance details Defined in Basement.PrimType type PrimSize Word64 = 8
Methods primSizeInBytes :: Proxy Word64 -> CountOf Word8 # primShiftToBytes :: Proxy Word64 -> Int # primBaUIndex :: ByteArray# -> Offset Word64 -> Word64 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> prim Word64 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> Word64 -> prim () # primAddrIndex :: Addr# -> Offset Word64 -> Word64 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word64 -> prim Word64 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word64 -> Word64 -> prim () #
PrimType Word8 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word8 |
Instance details Defined in Basement.PrimType type PrimSize Word8 = 1
Methods primSizeInBytes :: Proxy Word8 -> CountOf Word8 # primShiftToBytes :: Proxy Word8 -> Int # primBaUIndex :: ByteArray# -> Offset Word8 -> Word8 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> prim Word8 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> Word8 -> prim () # primAddrIndex :: Addr# -> Offset Word8 -> Word8 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word8 -> prim Word8 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word8 -> Word8 -> prim () #
PrimType Char # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Char |
Instance details Defined in Basement.PrimType type PrimSize Char = 4
Methods primSizeInBytes :: Proxy Char -> CountOf Word8 # primShiftToBytes :: Proxy Char -> Int # primBaUIndex :: ByteArray# -> Offset Char -> Char # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> prim Char # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> Char -> prim () # primAddrIndex :: Addr# -> Offset Char -> Char # primAddrRead :: PrimMonad prim => Addr# -> Offset Char -> prim Char # primAddrWrite :: PrimMonad prim => Addr# -> Offset Char -> Char -> prim () #
PrimType Double # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Double |
Instance details Defined in Basement.PrimType type PrimSize Double = 8
Methods primSizeInBytes :: Proxy Double -> CountOf Word8 # primShiftToBytes :: Proxy Double -> Int # primBaUIndex :: ByteArray# -> Offset Double -> Double # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> prim Double # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> Double -> prim () # primAddrIndex :: Addr# -> Offset Double -> Double # primAddrRead :: PrimMonad prim => Addr# -> Offset Double -> prim Double # primAddrWrite :: PrimMonad prim => Addr# -> Offset Double -> Double -> prim () #
PrimType Float # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Float |
Instance details Defined in Basement.PrimType type PrimSize Float = 4
Methods primSizeInBytes :: Proxy Float -> CountOf Word8 # primShiftToBytes :: Proxy Float -> Int # primBaUIndex :: ByteArray# -> Offset Float -> Float # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> prim Float # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> Float -> prim () # primAddrIndex :: Addr# -> Offset Float -> Float # primAddrRead :: PrimMonad prim => Addr# -> Offset Float -> prim Float # primAddrWrite :: PrimMonad prim => Addr# -> Offset Float -> Float -> prim () #
PrimType Int # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Int |
Instance details Defined in Basement.PrimType type PrimSize Int = 8
Methods primSizeInBytes :: Proxy Int -> CountOf Word8 # primShiftToBytes :: Proxy Int -> Int # primBaUIndex :: ByteArray# -> Offset Int -> Int # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> prim Int # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> Int -> prim () # primAddrIndex :: Addr# -> Offset Int -> Int # primAddrRead :: PrimMonad prim => Addr# -> Offset Int -> prim Int # primAddrWrite :: PrimMonad prim => Addr# -> Offset Int -> Int -> prim () #
PrimType Word # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word |
Instance details Defined in Basement.PrimType type PrimSize Word = 8
Methods primSizeInBytes :: Proxy Word -> CountOf Word8 # primShiftToBytes :: Proxy Word -> Int # primBaUIndex :: ByteArray# -> Offset Word -> Word # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> prim Word # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> Word -> prim () # primAddrIndex :: Addr# -> Offset Word -> Word # primAddrRead :: PrimMonad prim => Addr# -> Offset Word -> prim Word # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word -> Word -> prim () #
PrimType a => PrimType (BE a) # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize (BE a) |
Instance details Defined in Basement.PrimType type PrimSize (BE a) = PrimSize a
Methods primSizeInBytes :: Proxy (BE a) -> CountOf Word8 # primShiftToBytes :: Proxy (BE a) -> Int # primBaUIndex :: ByteArray# -> Offset (BE a) -> BE a # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> prim (BE a) # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> BE a -> prim () # primAddrIndex :: Addr# -> Offset (BE a) -> BE a # primAddrRead :: PrimMonad prim => Addr# -> Offset (BE a) -> prim (BE a) # primAddrWrite :: PrimMonad prim => Addr# -> Offset (BE a) -> BE a -> prim () #
PrimType a => PrimType (LE a) # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize (LE a) |
Instance details Defined in Basement.PrimType type PrimSize (LE a) = PrimSize a
Methods primSizeInBytes :: Proxy (LE a) -> CountOf Word8 # primShiftToBytes :: Proxy (LE a) -> Int # primBaUIndex :: ByteArray# -> Offset (LE a) -> LE a # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> prim (LE a) # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> LE a -> prim () # primAddrIndex :: Addr# -> Offset (LE a) -> LE a # primAddrRead :: PrimMonad prim => Addr# -> Offset (LE a) -> prim (LE a) # primAddrWrite :: PrimMonad prim => Addr# -> Offset (LE a) -> LE a -> prim () #

class PrimMemoryComparable ty #

A constraint class for serializable type that have an unique memory compare representation

e.g. Float and Double have -0.0 and 0.0 which are Eq individual, yet have a different memory representation which doesn't allow for memcmp operation

#### Instances

Instances details

PrimMemoryComparable Word128 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word256 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable CChar # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable CUChar # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Int16 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Int32 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Int64 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Int8 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word16 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word32 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word64 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word8 # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Char # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Int # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable Word # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable a => PrimMemoryComparable (BE a) # |
Instance details Defined in Basement.PrimType
PrimMemoryComparable a => PrimMemoryComparable (LE a) # |
Instance details Defined in Basement.PrimType

primBaIndex :: PrimType ty => ByteArray# -> Offset ty -> ty #

primMbaRead :: (PrimType ty, PrimMonad prim) => MutableByteArray# (PrimState prim) -> Offset ty -> prim ty #

primMbaWrite :: (PrimType ty, PrimMonad prim) => MutableByteArray# (PrimState prim) -> Offset ty -> ty -> prim () #

primArrayIndex :: Array# ty -> Offset ty -> ty #

primMutableArrayRead :: PrimMonad prim => MutableArray# (PrimState prim) ty -> Offset ty -> prim ty #

primMutableArrayWrite :: PrimMonad prim => MutableArray# (PrimState prim) ty -> Offset ty -> ty -> prim () #

primOffsetOfE :: PrimType a => Offset a -> Offset Word8 #

Deprecated: use offsetInBytes

primOffsetRecast :: (PrimType a, PrimType b) => Offset a -> Offset b #

sizeRecast :: (PrimType a, PrimType b) => CountOf a -> CountOf b #

Cast a CountOf linked to type A (CountOf A) to a CountOf linked to type B (CountOf B)

offsetAsSize :: Offset a -> CountOf a #

sizeAsOffset :: CountOf a -> Offset a #

sizeInBytes :: PrimType a => CountOf a -> CountOf Word8 #

offsetInBytes :: PrimType a => Offset a -> Offset Word8 #

offsetInElements :: PrimType a => Offset Word8 -> Offset a #

offsetIsAligned :: PrimType a => Proxy a -> Offset Word8 -> Bool #

primWordGetByteAndShift :: Word# -> (# Word#, Word# #) #

primWord64GetByteAndShift :: Word# -> (# Word#, Word# #) #

primWord64GetHiLo :: Word# -> (# Word#, Word# #) #