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

GHC ghc-devs at haskell.org
Tue Apr 10 03:23:00 UTC 2018


#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:  #13324            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by songzh):

 Replying to [comment:23 RyanGlScott]:
 > songzh, I finally delivered on my promise to implement the ability to
 use `PartialTypeSignatures` in standalone `deriving` declarations //à la//
 `deriving _ => Eq (Foo a)`. Does this make things easier for you on your
 end?

 Yes! Your `Any` wrinkle has worked very well already, but this will make a
 lot improvement for `derive-topdown` package. With new
 `PartialTypeSignatures` a lot of code can be removed in the package, but
 for compatibility reason, I will keep them for older GHC.

 Even though class instance contexts can be generated and inferred now and
 type role is carefully handled for now, three other packages,`primitive`,
 `th-expand-syns`, `transformers` ,still are needed. This stops current
 `derive-topdown` being used inside ghc's code, so I will write a minimal
 package in order to reduce the dependencies of `derive-topdown`.

 Thanks.

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


More information about the ghc-tickets mailing list