[GHC] #10595: BuiltinRules override other rules in some cases.

GHC ghc-devs at haskell.org
Wed Jul 8 05:57:31 UTC 2015


#10595: BuiltinRules override other rules in some cases.
-------------------------------------+-------------------------------------
        Reporter:  gjsimms           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Replying to [comment:6 simonpj]:
 > Replying to [comment:5 rwbarton]:
 > > In this case it seems that what we want to do is rewrite the left hand
 side of the new rule itself. Not sure if this is a good idea in general
 though.
 >
 > That sounds delicate and I have no idea what will really happen.  The
 solution I proposed is simple and robust.

 Agreed, but when the method in question belongs to a type class defined in
 another package (as in the original report), this solution is non-modular.
 A second library that defines `d'` cannot define a rule for `d' exp` that
 coexists with a rule for `d exp` unless the two libraries agree on a
 "`exp'`".

 It would be nicer if the rules could somehow refer directly to the-
 instance-of-exp-for-Double. Of course, this is in feature request
 territory.

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


More information about the ghc-tickets mailing list