[GHC] #3834: Standalone deriving of an unsupported class panics GHC
GHC
trac at galois.com
Wed Jan 20 20:25:54 EST 2010
#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
More information about the Glasgow-haskell-bugs
mailing list