potoki-2.1.4.1: Simple streaming in IO

Safe HaskellNone
LanguageHaskell2010

Potoki.Produce

Synopsis

Documentation

data Produce element #

Passive producer of elements with support for early termination and resource management.

transform :: Transform input output -> Produce input -> Produce output #

list :: [input] -> Produce input #

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) #

Read from a file by path.

  • Exception-free
  • Automatic resource management

fileBytesAtOffset :: FilePath -> Int -> Produce (Either IOException ByteString) #

Read from a file by path.

  • Exception-free
  • Automatic resource management

fileText :: FilePath -> Produce (Either IOException Text) #

Read from a file by path.

  • Exception-free
  • Automatic resource management

directoryContents :: FilePath -> Produce (Either IOException FilePath) #

Sorted subpaths of the directory.

finiteMVar :: MVar (Maybe element) -> Produce element #

Read from MVar. Nothing gets interpreted as the end of input.

infiniteMVar :: MVar element -> Produce element #

Read from MVar. Never stops.

tbmChan :: TBMChan element -> Produce element #

tmChan :: TMChan element -> Produce element #

enumInRange :: (Enum a, Ord a) => a -> a -> Produce a #

mergeOrdering :: (a -> a -> Bool) -> Produce a -> Produce a -> Produce a #

Merge two ordered sequences into one