use multiple handles #4

Closed
trystan opened this Issue Mar 14, 2011 · 2 comments

Comments

Projects
None yet
1 participant
@trystan
Owner

trystan commented Mar 14, 2011

Do you think it would be possible to add a function

capture' :: IO a -> IO (String, a)

that captures both stdout and stderr?

Example of usage:

>>> capture' (hPutStr stdout "foo" >> hPutStr stderr "bar" >> hPutStr stdout "baz")
("foobarbaz", ())

Cheers,
Simon

@trystan

This comment has been minimized.

Show comment
Hide comment
@trystan

trystan Mar 15, 2011

Owner

Created
hSilenceMany :: [Handle] -> IO a -> IO a
hCaptureMany :: [Handle] -> IO a -> IO (String, a)

Owner

trystan commented Mar 15, 2011

Created
hSilenceMany :: [Handle] -> IO a -> IO a
hCaptureMany :: [Handle] -> IO a -> IO (String, a)

@trystan

This comment has been minimized.

Show comment
Hide comment
@trystan

trystan Mar 15, 2011

Owner

Renamed *Many to just *

Owner

trystan commented Mar 15, 2011

Renamed *Many to just *

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment