[GHC] #3833: Panic on standlone deriving without
GeneralizedNewtypeDeriving
GHC
trac at galois.com
Wed Jan 20 13:21:23 EST 2010
#3833: Panic on standlone deriving without GeneralizedNewtypeDeriving
---------------------------------+------------------------------------------
Reporter: Khudyakov | 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
---------------------------------+------------------------------------------
I found that GHC panics on the following program if
GeneralizedNewtypeDeriving pragma is removed. Otherwise it works just
fine.
{{{
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- Removal causes crash
import Data.Monoid
newtype DecodeMap e = DecodeMap [e]
deriving instance Monoid (DecodeMap e)
}}}
Here is error message it produce
{{{
ghc: panic! (the 'impossible' happened)
(GHC version 6.12.1 for i386-unknown-linux):
genDerivBinds: bad derived class base:Data.Monoid.Monoid{tc rha}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
This bug appears only in GHC6.12.1. GHC6.10.4 rightfully complain that I
should enable GeneralizedNewtypeDeriving unstead of crashing.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3833>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list