[GHC] #7401: Can't derive instance for Eq when datatype has no constructor, while it is trivial do do so.

GHC ghc-devs at haskell.org
Wed Jun 17 11:43:51 UTC 2015


#7401: Can't derive instance for Eq when datatype has no constructor, while it is
trivial do do so.
-------------------------------------+-------------------------------------
        Reporter:  jpbernardy        |                   Owner:  osa1
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.6.1
      Resolution:                    |                Keywords:  deriving,
Operating System:  Unknown/Multiple  |  newcomer
 Type of failure:  GHC rejects       |            Architecture:
  valid program                      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D978
-------------------------------------+-------------------------------------

Comment (by simonpj):

 What if the method does not have an `a` argument?  `Read` is one example,
 but there are probably others.  `Ix` perhaps.

 Still, I really don't care myself.  What I want is for someone to be able
 to look in the user manual and correctly predict what derived instance
 you'll get for an empty data type.  If you and osa1 agree, I bet everyone
 else will too.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7401#comment:31>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list