Ticket #1442 (closed bug: invalid)
ghc and ghci differs in deailing with "undefined" with I/O
main = putStrLn ("x == " ++ undefined)
produces the following expected output with ghci:
x == *** Exception: Prelude.undefined
but when compiled with ghc and run, it gives:
$./a.out a.out: Prelude.undefined
we observed this in all the way back to ghc6.2.1; possibly earlier.
The semantics of error reporting in combination with I/O is murky; admittedly laziness is observable at the top-level when errors are reported. But at least ghc and ghci should do the same thing. And the behavior of ghci seems to be more appropriate.
Jeff Lewis and Levent Erkok