Skip to content

Loading…

use multiple handles #4

Closed
trystan opened this Issue · 2 comments

1 participant

@trystan
Owner

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
Owner

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

@trystan
Owner

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
Something went wrong with that request. Please try again.