Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Produce element = Produce (Acquire (Fetch element))
- list :: [input] -> Produce input
- transform :: Transform input output -> Produce input -> Produce output
- vector :: Vector vector input => vector input -> Produce input
- vectorWithIndices :: Vector vector a => vector a -> Produce (Int, a)
- hashMapRows :: HashMap a b -> Produce (a, b)
- fileBytes :: FilePath -> Produce (Either IOException ByteString)
- fileBytesAtOffset :: FilePath -> Int -> Produce (Either IOException ByteString)
- fileText :: FilePath -> Produce (Either IOException Text)
- stdinBytes :: Produce (Either IOException ByteString)
- directoryContents :: FilePath -> Produce (Either IOException FilePath)
- finiteMVar :: MVar (Maybe element) -> Produce element
- infiniteMVar :: MVar element -> Produce element
- lazyByteString :: ByteString -> Produce ByteString
- enumInRange :: (Enum a, Ord a) => a -> a -> Produce a
- mergeOrdering :: (a -> a -> Bool) -> Produce a -> Produce a -> Produce a
- unfoldr :: Unfoldr a -> Produce a
Documentation
newtype Produce element Source #
Passive producer of elements with support for early termination and resource management.
hashMapRows :: HashMap a b -> Produce (a, b) Source #
fileBytes :: FilePath -> Produce (Either IOException ByteString) Source #
Read from a file by path.
- Exception-free
- Automatic resource management
fileBytesAtOffset :: FilePath -> Int -> Produce (Either IOException ByteString) Source #
Read from a file by path.
- Exception-free
- Automatic resource management
fileText :: FilePath -> Produce (Either IOException Text) Source #
Read from a file by path.
- Exception-free
- Automatic resource management
directoryContents :: FilePath -> Produce (Either IOException FilePath) Source #
Sorted subpaths of the directory.
finiteMVar :: MVar (Maybe element) -> Produce element Source #
Read from MVar. Nothing gets interpreted as the end of input.
infiniteMVar :: MVar element -> Produce element Source #
Read from MVar. Never stops.
mergeOrdering :: (a -> a -> Bool) -> Produce a -> Produce a -> Produce a Source #
Merge two ordered sequences into one