b-tree-0.1.3: Immutable disk-based B* trees

Safe HaskellSafe
LanguageHaskell2010

BTree.BinaryList

Contents

Synopsis

Documentation

data BinaryList a Source #

A file containing a finite list of binary encoded items

Instances

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