#3834: Standalone deriving of an unsupported class panics GHC
---------------------------------+------------------------------------------
    Reporter:  diatchki          |       Owner:                    
        Type:  bug               |      Status:  new               
    Priority:  normal            |   Component:  Compiler          
     Version:  6.12.1            |    Keywords:                    
          Os:  Unknown/Multiple  |    Testcase:                    
Architecture:  Unknown/Multiple  |     Failure:  Compile-time crash
---------------------------------+------------------------------------------
 Using standalone deriving on a non-standard class, without
 GeneralizedNewtypeDeriving, causes GHC to panic.  Here is an example:

 {{{
 {-# LANGUAGE StandaloneDeriving #-}

 class C a
 instance C Int

 newtype T = T Int
 deriving instance C T

 Output:
 ghc: panic! (the 'impossible' happened)
   (GHC version 6.12.1 for x86_64-unknown-linux):
         genDerivBinds: bad derived class main:Main.C{tc rdh}
 }}}

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