Ticket #2612 (closed bug: duplicate)
deriving Data.Typeable on phantom newtypes does not report that DeriveDataTypeable is needed
Description
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 for `Foo'
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 for `Foo'
Change History
Note: See
TracTickets for help on using
tickets.
