
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 > > > > > > _______________________________________________ > Haskell-Cafe mailing
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 https://hackage.haskell.org/package/silently may be of interest to you. Although I do not now whether it is threadsafe. On 06/30/2015 08:27 PM, Hiromi ISHII wrote: list > Haskell-Cafe@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVkuDxAAoJEM0PYZBmfhoBZUIIALUtTNr760pmWUg1CNXmYAzc /0dh2vVY9aidf7FV9OGlKB2wif1JMLbU7jpY4d0KIkIO4idpMjJXVRjLwiGtJngz 8jwBj2A6Y/uhx3FelJmO7F4m+RdwMGOQHsxTrnZET1HoCy/B+yEftNWAKht+OCA0 UOzWWYlcb2Z+JcLGoSL5xiRjkDhFo6QpdyMAiE9hZ6LzbKG06lQCslz2pRCY2wSx fdPlWzZnZtZVIgpjICe7lrCCT6yynGO4mdPbu3fQ/b3g84qNlsVrpoaAXtOERy7W k5XjpLBcV0qv1+xjlpr6pviQPLRcpod2G8ZxvjuRdTpJXXkJV90nkcMVCPYv244= =yMaF -----END PGP SIGNATURE-----