[GHC] #7401: Can't derive instance for Eq when datatype has no constructor, when it's trivial do do so.
GHC
cvs-ghc at haskell.org
Fri Nov 9 09:33:57 CET 2012
#7401: Can't derive instance for Eq when datatype has no constructor, when it's
trivial do do so.
-----------------------------+----------------------------------------------
Reporter: jpbernardy | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.1 | Keywords: deriving
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
On a "phantom datatype" D, one gets the message:
Can't make a derived instance of `Eq D':
`D' must have at least one data constructor
However there is a trivial, correct instance of Eq D:
instance Eq D where
(==) = undefined
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7401>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list