[Haskell-cafe] ANN: io-capture-0.2 capturing std(out|err) in IO
nonowarn at gmail.com
Thu Mar 26 15:56:32 EDT 2009
Hi, I announce the release of io-capture package of version 0.2
io-capture is a Library to capturing stdout and stderr in IO
action. It exports a function named `capture', It takes an IO
and an String, the action to run and the given whole stdin, and
returns whole stdout and stderr in the action as String.
ghci> :m +System.IO.Capture
ghci> :m +System.IO
ghci> capture (getLine >>= putStr >> getLine >>= hPutStr stderr) "foo
io-capture is available on hackage, repository is on patch-tag.
It behaves almost fine, but It's still experimental, I know some
trouble about when given lazy reading action such as getContents. And
there may be unknown bugs. If you find it, feel free to report it and
any feedbacks are welcome.
Thanks for reading,
More information about the Haskell-Cafe