Forcing the type to be IO {} instead of IO() causes a "panic! The impossible has happened" output.
Below is the source code in which the bug occurs. It is easily reproduce-able, by having the type be IO{} instead of IO().
When ran, this code will produce the "panic! The impossible has happened" output. Which told me to report the bug here.
By changing IO() to IO{} (which I did by accident), no exception is thrown, it simply tells the user to panic!
main :: IO {}
main = do
e1 <- getLine
e2 <- getLine
print ((read e1) + (read e2))
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |