hpp-0.3.0.0: A Haskell pre-processor

Safe HaskellNone
LanguageHaskell2010

Hpp.StreamIO

Description

IO on streams.

Synopsis

Documentation

sourceFile :: (MonadIO m, MonadIO m') => (Cleanup -> m' ()) -> FilePath -> m' (Source m String ()) Source

sourceFile registerCleanup filePath produces a Source of lines from file filePath after registering an action that closes the file using the provided registerCleanup function.

sinkToFile :: MonadIO m => (Cleanup -> m ()) -> FilePath -> Streamer m String o () Source

Incrementally writes Strings to a temporary file. When all input is exhausted, the temporary file is renamed to the supplied FilePath.

sinkTell :: Monad m => (a -> m ()) -> Streamer m a o () Source

Sink a stream with a function evaluated only for its side-effects.

sinkToStdOut :: MonadIO m => Streamer m String o () Source

Sink a stream to stdout

sink_ :: Monad m => Streamer m i o () Source

sink_ = forever await Simply discards all inputs. This may be used to exhaust a stream solely for its effects.