#7221: DataKinds with recursive data and type synonym causing GHC to crash
--------------------------------+-------------------------------------------
Reporter: gereeter | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.2 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Compile-time crash | Testcase:
Blockedby: | Blocking:
Related: |
--------------------------------+-------------------------------------------
When working on an answer to a stackoverflow
[http://stackoverflow.com/questions/12221080/applying-a-fixed-length-
vector-function-to-the-inital-part-of-a-longer-fixed-len 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, 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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7221>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs