Type Nats cause crash if GHC.TypeLits not imported
If I create a file "test.hs" with the following code:
data Poly (a::a)
x = undefined :: Poly 1
when I load it into ghci, I get the error message:
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-unknown-linux):
lookupVers2
<<details unavailable>>
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Now, modify the file into
import GHC.TypeLits
data Poly (a::a)
x = undefined :: Poly 1
and no error is reported. What's weird is that if we now modify the file back to the original, then the error is still not reported. Everything compiles perfectly fine.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |