Hugs dumps errors, traces, and other diagnostics to stdout. It even has the rather perverse #define errorStream stdout (except on windows, it appears) so I assume there is a reason for it. However, I can't imagine the reason, and it is quite annoying to me. I am running "December 2001" hugs on Debian GNU/Linux. I looked at the CVS sources, and trace now seems to go to stderr, but errors still seem to go to stdout (I haven't tried it to be sure). Would you accept a patch to change everything to stderr? Andrew
Hugs dumps errors, traces, and other diagnostics to stdout. [...] However, I can't imagine the reason, and it is quite annoying to me.
The actual reasons are probably lost in the mists of time. The potential problem for Hugs is that, thanks to buffering, error messages might come out of sync with (earlier than) output which normal output.
Would you accept a patch to change everything to stderr?
(I'm assuming 'everything' means error messages only not prompts, Haskell I/O, etc.) A patch to change it on runhugs would definitely be cool - anything not generated by Haskell should definitely go to stderr. Changing Hugs is potentially more problematic because of issues of synchronization between stderr and stdout so I'm a little wary of doing this and we'd want (you) to test it thoroughly first, provide some test cases, etc. [Hmmm, what does ghci do? Do they have any problems?] -- Alastair Reid
participants (2)
-
Alastair Reid -
Andrew Pimlott