• simonpj@microsoft.com's avatar
    Improved RULE lhs typechecking; less dictionary sharing · 5a8a219c
    simonpj@microsoft.com authored
    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) = ...
    5a8a219c
TcSimplify.lhs 85.9 KB