using GADT syntax for an associated datatype causes GHC to panic
I am aware that this is probably not supposed to be supported. But even if using a GADT as an associated datatype instance does not directly work, it would be nice if
-
the GADT syntax was supported for "normal"
associated datatypes,
-
the error message was more informative.
Example program:
{-# LANGUAGE TypeFamilies, GADTs #-}
class X a where
data T a
instance X Int where
data T Int where
C :: T Int
Error message:
ghc-6.9.20080615: panic! (the 'impossible' happened)
(GHC version 6.9.20080615 for x86_64-unknown-linux):
Maybe.fromJust: Nothing
Occurs with recent snapshot, but also with 6.8.2 and 6.8.3.
Andres
Trac metadata
Trac field | Value |
---|---|
Version | 6.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |