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

GHC ghc-devs at haskell.org
Tue Jul 14 08:42:53 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:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by kosmikus):

 Yes, I think it makes sense to require at least any sort of default
 definition for all class methods, regardless of whether it is a normal
 default or a generic default.

 It might also be sensible to take MINIMAL pragmas into account. If an
 explicit non-empty MINIMAL pragma is specified, then I think the intent of
 the author is to say that it doesn't make sense to give an empty class
 instance, and similarly, it would then also not make sense to derive it.
 But I'm open to suggestions. Even if we allow DeriveAnyClass for classes
 that have e.g. mutually recursive defaults and a non-empty MINIMAL pragma,
 I guess we'd at least still get a warning reported for the derived
 instance.

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


More information about the ghc-tickets mailing list