runghc sometimes won't allow redirecting of stdout/stderr
See attached test.hs. Here's stdout working normally:
$ runhaskell test.hs | cat
output
$
But after uncommenting either the cmdArgs line or the defaultMainWithArgs line, stdout can't be captured:
$ runhaskell test.hs | cat
$
It does appear on the console if you don't redirect though. The same goes for stderr. This prevents me testing uncompiled scripts with shelltestrunner. I'm on mac os 10.5.
Edited by Ian Lynagh -