Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Produce element :: * -> *
- transform :: Transform input output -> Produce input -> Produce output
- list :: [input] -> Produce input
- vector :: Vector input -> Produce input
- 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)
- directoryContents :: FilePath -> Produce (Either IOException FilePath)
- finiteMVar :: MVar (Maybe element) -> Produce element
- infiniteMVar :: MVar element -> Produce element
Documentation
data Produce element :: * -> * #
Passive producer of elements with support for early termination.
Automates the management of resources.
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.