GeneralizedNewtypeDeriving doesn't work with data families
Observe:
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
module Bug9 where
class C a where
data D a
instance C Bool where
newtype D Bool = DInt Int deriving (Eq, Show, Num)
The deriving of Num fails, whereas the corresponding standalone newtype works fine.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | lennart@augustsson.net |
| Operating system | |
| Architecture |