Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Silently is a package that allows you to run an IO action and prevent it from writing to stdout, or any other handle, by using "silence". Or you can capture the output for yourself using "capture". For example; the program import System.IO.Silently main = do putStr "putStrLn: " >> putStrLn "puppies!" putStr "silenced: " >> silence (putStrLn "kittens!") putStrLn "" (captured, result) <- capture (putStr "wookies!" >> return 123) putStr "captured: " >> putStrLn captured putStr "returned: " >> putStrLn (show result) will print putStrLn: puppies! silenced: captured: wookies! returned: 123