2 + 2 = 14
Leon Smith
lps at po.cwru.edu
Wed Jun 13 15:12:26 EDT 2001
Here's a amusing ghci session:
Main> putStr "1" >> error "Error"
*** Exception: Error
Main> 2 + 2
14
Main>
It appears as though the output needs to be flushed before an error
message from an unhandled exception is printed, so that the session
looks something like this:
Main> putStr "1" >> error "Error"
1
*** Exception: Error
Main> 2 + 2
4
Main>
Maybe output should be flushed before the "Main>" prompt is printed,
like this:
Main> putStr "1" >> error "Error"
*** Exception: Error
1
Main> ...
I'm not sure which would be better, but hugs has the former behavior.
best,
leon
More information about the Glasgow-haskell-bugs
mailing list