#7401: Can't derive instance for Eq when datatype has no constructor, while it 
is
trivial do do so.
---------------------------------+------------------------------------------
    Reporter:  jpbernardy        |       Owner:                           
        Type:  feature request   |      Status:  new                      
    Priority:  normal            |   Milestone:                           
   Component:  Compiler          |     Version:  7.6.1                    
    Keywords:  deriving          |          Os:  Unknown/Multiple         
Architecture:  Unknown/Multiple  |     Failure:  GHC rejects valid program
  Difficulty:  Unknown           |    Testcase:                           
   Blockedby:                    |    Blocking:                           
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by igloo):

  * difficulty:  => Unknown


Old description:

> 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

New description:

 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#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-tickets

Reply via email to