silently-0.0.2: Prevent or capture writing to stdout.

System.IO.Silently

Description

Need to prevent output to the terminal or stderr? Need to capture it and use it for your own means? Now you can, with silently and capture.

Synopsis

Documentation

silently :: IO a -> IO aSource

Run an IO action while preventing all output to stdout. This will, as a side effect, create and delete a temp file in the current directory.

hSilently :: Handle -> IO a -> IO aSource

Run an IO action while preventing all output to the given handle. This will, as a side effect, create and delete a temp file in the current directory.

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

Run an IO action while preventing and capturing all output to stdout. This will, as a side effect, create and delete a temp file in the current directory.

hCapture :: Handle -> IO a -> IO (String, a)Source

Run an IO action while preventing and capturing all output to the given handle. This will, as a side effect, create and delete a temp file in the current directory.