Improved RULE lhs typechecking; less dictionary sharing
authorsimonpj@microsoft.com <unknown>
Fri, 19 May 2006 10:34:33 +0000 (10:34 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 19 May 2006 10:34:33 +0000 (10:34 +0000)
commit5a8a219c131b56c75dbb3110da3ab5ae3715ff66
tree3d0dd85f07f070b16ed6a8bc6f6c6fbcf39bc28d
parentcbc86d748d5f7b5ad5503c9e87c0b5c0402f27bc
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) = ...
compiler/typecheck/TcRules.lhs
compiler/typecheck/TcSimplify.lhs