box-0.6.3: boxes
Safe HaskellNone
LanguageHaskell2010

Box.IO

Description

IO actions

Synopsis

Documentation

fromStdin :: Emitter IO Text Source #

emit Text from stdin inputs

>>> :t emit fromStdin
emit fromStdin :: IO (Maybe Text)

toStdout :: Committer IO Text Source #

commit to stdout

>>> commit toStdout ("I'm committed!" :: Text)
I'm committed!
True

fromStdinN :: Int -> Cont IO (Emitter IO Text) Source #

finite console emitter

toStdoutN :: Int -> Cont IO (Committer IO Text) Source #

finite console committer

readStdin :: Read a => Emitter IO a Source #

read from console, throwing away read errors

showStdout :: Show a => Committer IO a Source #

show to stdout

handleE :: Handle -> Emitter IO Text Source #

Emits lines of Text from a handle.

handleC :: Handle -> Committer IO Text Source #

Commit lines of Text to a handle.

cRef :: MonadConc m => m (Committer m a, m [a]) Source #

commit to an IORef

eRef :: MonadConc m => [a] -> m (Emitter m a) Source #

emit from a list IORef

fileE :: FilePath -> Cont IO (Emitter IO Text) Source #

Emits lines of Text from a file.

fileWriteC :: FilePath -> Cont IO (Committer IO Text) Source #

Commits lines of Text to a file.

fileAppendC :: FilePath -> Cont IO (Committer IO Text) Source #

Commits lines of Text, appending to a file.