[GHC] #2612: deriving Data.Typeable on phantom newtypes does not
report that DeriveDataTypeable is needed
GHC
trac at galois.com
Fri Sep 19 07:03:30 EDT 2008
#2612: deriving Data.Typeable on phantom newtypes does not report that
DeriveDataTypeable is needed
-----------------------+----------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.9 | Severity: normal
Keywords: | Testcase:
Architecture: x86 | Os: MacOS X
-----------------------+----------------------------------------------------
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'
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2612>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list