[GHC] #5462: Deriving clause for arbitrary classes

GHC ghc-devs at haskell.org
Fri Oct 3 15:59:55 UTC 2014


#5462: Deriving clause for arbitrary classes
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |            Owner:  dreixel
                  Type:  feature     |           Status:  new
  request                            |        Milestone:  7.10.1
              Priority:  normal      |          Version:  7.2.1
             Component:  Compiler    |         Keywords:  Generics
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:  #7346
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by hvr):

 Replying to [comment:34 simonpj]:
 >  * Make it possible for a library author to make a class `C` which can
 be used in `..deriving( C )` just like built-in classes.
 >  * Ultimately: remove the built-in code for deriving `Eq`, `Ord` etc
 with generic code.

 IMHO the value of theses two goals should not be underestimated, as this
 feature would allow for custom Prelude to provide (for instance) custom
 `Eq`/`Ord` instances different from the default ones generated by GHC
 while allowing to use automatic derivation as if they were built-ins
 (which I don't think `RebindableSyntax` already allows at this point).

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


More information about the ghc-tickets mailing list