patch applied (ghc): Improved RULE lhs typechecking; less dictionary sharing

Simon Peyton Jones simonpj at microsoft.com
Fri May 19 06:43:10 EDT 2006


Fri May 19 03:34:33 PDT 2006  simonpj at microsoft.com
  * Improved RULE lhs typechecking; less dictionary sharing
  
  See long comment with Simplify.tcSimplifyRuleLhs.
  
  Here's the key example:
  
    RULE "g"  forall x y z. g (x == y) (y == z) = ...
  
  Here, the two dictionaries are *identical*, but we do NOT WANT to
  generate the rule
  
  RULE	forall x::a, y::a, z::a, d1::Eq a
  	  f ((==) d1 x y) ((>) d1 y z) = ...
  
  Instead we want
  
  RULE	forall x::a, y::a, z::a, d1::Eq a, d2:Eq a
  	  f ((==) d1 x y) ((>) d2 y z) = ...
  

    M ./compiler/typecheck/TcRules.lhs -3 +3
    M ./compiler/typecheck/TcSimplify.lhs -42 +49


More information about the Cvs-ghc mailing list