Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
class Bulk (Rep a) a => Storable a where Source
Class of element types that we can load and store to the file system.
TODO: change to Persistable.
Specification of how the elements are arranged in the file.
For atomic elements the specification is the storage type.
For fixed-length arrays of elements, the specification contains the element storage type as well as the array length.
Representation tag used for an array of these elements.
For atomic elements this will be F
, for foreign arrays that
do not require extra copying after the data is read.
For tuples of elements, this will be a tuple of strided arrays, so the elements can also be used without copying.
sizeElem :: Spec a -> Int Source
Get the size of a single element, in bytes.
:: Spec a | Element specification. |
-> Integer | Number of elements to read. |
-> Bucket | Bucket to read from. |
-> IO (Maybe (Array (Rep a) a)) |
Read an array of the given length from a bucket.
If the bucket does not contain a whole number of elements remaining
then Nothing
.