[GHC] #13044: make it possible to apply GHC rewrite rules to class methods

GHC ghc-devs at haskell.org
Wed Jan 4 14:33:22 UTC 2017


#13044: make it possible to apply GHC rewrite rules to class methods
-------------------------------------+-------------------------------------
        Reporter:  George            |                Owner:
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
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 bgamari):

 The limitation described here leads to quite a bit of boilerplate in GHC
 itself to ensure that users can write rules against, e.g. `(==)`. See, for
 instance, `GHC.Int.eqInt64`.

 Moreover, I have seen a number of well-known packages (`text` being one
 example) which mistakenly try to match overloaded operators in their
 rewrite rules. Thankfully we now produce warnings in these cases, but
 previously these were latent performance bugs just waiting to be noticed.
 It would be great to eliminate this sharp edge.

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


More information about the ghc-tickets mailing list