#2417: using GADT syntax for an associated datatype causes GHC to panic
------------------------+---------------------------------------------------
    Reporter:  guest    |       Owner:          
        Type:  bug      |      Status:  new     
    Priority:  normal   |   Component:  Compiler
     Version:  6.9      |    Severity:  minor   
    Keywords:           |    Testcase:          
Architecture:  Unknown  |          Os:  Unknown 
------------------------+---------------------------------------------------
 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

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2417>
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

Reply via email to