[GHC] #10607: Auto derive from top to bottom

GHC ghc-devs at haskell.org
Thu Feb 23 15:35:09 UTC 2017


#10607: Auto derive from top to bottom
-------------------------------------+-------------------------------------
        Reporter:  songzh            |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:  deriving,
                                     |  typeclass, auto
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Hm... you know, that's a good observation. This approach does require
 another language extension (`PartialTypeSignatures`), but it certainly
 achieves the same end result.

 My only hesitation is that I don't understand `PartialTypeSignatures` that
 well, so I haven't fully considered the ramifications of allowing this.
 I'm fairly sure it would require a more complication implementation, since
 you'd also probably want to allow things like this:

 {{{#!hs
 deriving instance (C a, _) => C (T a b c)
 }}}

 But the prospect of not needing any changes to the language is a mighty
 tempting one.

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


More information about the ghc-tickets mailing list