
30 Jun
2015
30 Jun
'15
2:27 p.m.
Hi, I'm currently writing a web app to check the spec of input code usging QuickCheck. quickCheck* functions writes results to stderr & stdout, but I don't want them written to the app's original stdout/err. (I'm using SafeHaskell features to avoid malicious code executed, so don't worry about that :-)) So I want to execute I/O action hijacking stdout/err in a thread-safe manner. For example, I need function like below: censorHandles :: IO a -> IO (a, String, String) censorHandles = ... or withStd :: Handle -> Handle -> Handle -> IO a -> IO a withStd = ... -- Hiromi ISHII konn.jinro@gmail.com