Panic on standlone deriving without GeneralizedNewtypeDeriving
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |