[GHC] #12814: Should GND infer an instance context when deriving method-free classes?

GHC ghc-devs at haskell.org
Tue Nov 8 19:26:05 UTC 2016


#12814: Should GND infer an instance context when deriving method-free classes?
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11369, #12810    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I am sure you understand this better than I do, but what happens in a case
 involving non-regular recursion (e.g. deriving `Eq` for `data X a = A a |
 B (X (a, a))`)?

 I argued for the same approach in the setting of `DeriveAnyClass`, and was
 disappointed that instead a heuristic was adopted that has no reason to be
 correct in general, so I think something is a bit "broken" here, in the
 sense of your last paragraph.

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


More information about the ghc-tickets mailing list