Safe Haskell | Safe-Infered |
---|
- data B
- data family Array r sh e
- fromByteString :: Shape sh => sh -> ByteString -> Array B sh Word8
- toByteString :: Array B sh Word8 -> ByteString
Documentation
Strict ByteStrings arrays are represented as ForeignPtr buffers of Word8
data family Array r sh e Source
Arrays with a representation tag, shape, and element type.
Use one of the type tags like D
, U
and so on for r
,
one of DIM1
, DIM2
... for sh
.
fromByteString :: Shape sh => sh -> ByteString -> Array B sh Word8Source
O(1). Wrap a ByteString
as an array.
toByteString :: Array B sh Word8 -> ByteStringSource
O(1). Unpack a ByteString
from an array.