DataKinds with recursive data and type synonym causing GHC to crash
When working on an answer to a stackoverflow question, I got the following ghc panic:
urk! lookup local fingerprint main:Main.VZero{d r9Y}
The relevant code is:
{-# LANGUAGE DataKinds #-}
data VNat = VZero | VSucc VNat
type T1 = VZero
main = return ()
The problem did not arise in GHCi or with any optimization turned on. Additionally, it presumably has some machine-dependent aspects, as the author of the stackoverflow problem did not mention ghc crashing. Then again, this error occured after type checking, and that author had a type error. I have no idea as to whether this is related to bug #5036 (closed), which had a similar error message but vastly different circumstances. The error did not occur when I made VNat not recursive. Oddly, it seemed to occur during the "Deleting temp dirs" phase of compilation:
*** Deleting temp dirs:
Deleting: /tmp/ghc27666_0
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.2 for x86_64-unknown-linux):
urk! lookup local fingerprint main:Main.VZero{d r9Y}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I am running Arch Linux.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |