[GHC] #10598: DeriveAnyClass and GND don't work well together

GHC ghc-devs at haskell.org
Sun Jul 19 00:24:19 UTC 2015


#10598: DeriveAnyClass and GND don't work well together
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by oerjan):

 * cc: oerjan (added)


Comment:

 Replying to [comment:3 goldfire]:
 > Now, the user chooses what facility provides the instances. Note that
 I've done something currently impossible: I've used GND for the `Read`
 class. Normally, we don't want this behavior, and (to my knowledge)
 there's no way to convince GHC to use GND to derive a `Read` or `Show`
 instance. But maybe some user out there does want it.

 I can think of at least one such use case that seems to make sense:
 Deriving `Read` and `Show` for newtypes around standard numeric types.

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


More information about the ghc-tickets mailing list