Ticket #3833 (closed bug: fixed)
Panic on standlone deriving without GeneralizedNewtypeDeriving
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

