Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data BinaryList a
- toBinaryList :: forall m a r. (MonadMask m, MonadIO m, Binary a) => FilePath -> Producer a m r -> m (BinaryList a, r)
- open :: FilePath -> BinaryList a
- stream :: forall m a. (Binary a, MonadMask m, MonadIO m) => BinaryList a -> ExceptT String m (Producer a m (Either String ()))
- length :: (MonadMask m, MonadIO m) => BinaryList a -> ExceptT String m Word64
- filePath :: BinaryList a -> FilePath
Documentation
data BinaryList a Source #
A file containing a finite list of binary encoded items
Instances
Show (BinaryList a) Source # | |
Defined in BTree.BinaryList showsPrec :: Int -> BinaryList a -> ShowS # show :: BinaryList a -> String # showList :: [BinaryList a] -> ShowS # |
Construction
toBinaryList :: forall m a r. (MonadMask m, MonadIO m, Binary a) => FilePath -> Producer a m r -> m (BinaryList a, r) Source #
Encode the items of the given producer
Fetching contents
open :: FilePath -> BinaryList a Source #
Open a BinaryList
file.
TODO: Sanity checking at open time.
stream :: forall m a. (Binary a, MonadMask m, MonadIO m) => BinaryList a -> ExceptT String m (Producer a m (Either String ())) Source #
Stream the items out of a BinaryList
Other queries
filePath :: BinaryList a -> FilePath Source #
Get the path to the BinaryList
file