deriving Data.Typeable on phantom newtypes does not report that DeriveDataTypeable is needed
newtype Foo x = Foo deriving (Typeable)
reports the rather cryptic error message:
Can't make a derived instance of
Typeable (Foo x)' (even with cunning newtype deriving:) In the newtype declaration forFoo'
When newtype is replaced with data, this much more useful error message is given:
Can't make a derived instance of
Typeable (Foo x)' (You need -XDeriveDataTypeable to derive an instance for this class) In the data type declaration forFoo'
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |