Tc panic when type declaration is missing
Compile the attached snippet with HEAD GHC.
ghc: panic! (the 'impossible' happened) (GHC version 7.7.20121114 for x86_64-unknown-linux): tcTyVarDetails <<details unavailable>>
You need to install the "thrist-0.3" package from Hackage.
When I just paste the 'Thrist' definition into the code the panic does not happen. (It resulted in this message for me:
Occurs check: cannot construct the infinite type: t2 ~ 'St t2 Expected type: Thrist Nat (At t4) t2 t3 Actual type: Thrist Nat (At t4) b t3 Relevant bindings include go :: Thrist Nat (At t4) t2 t3 -> t -> t1 (bound at GHC-7438.hs:20:11) In the first argument of
go', namely
rest' In the second argument of(:)', namely
go rest acc' In the expression: c : go rest acc Failed, modules loaded: none.
)
Looks like interaction of non-generalized (local) let in conjunction with imported polykinded GADT.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |