diff options
author | 2008-06-29 11:23:22 -0400 | |
---|---|---|
committer | 2008-06-29 11:23:22 -0400 | |
commit | 8b56aa658fa544d041a2eac45c87d76f4597f94d (patch) | |
tree | d3f8a65f52bc41215c3a84a1122e7abe2a7105c4 /src/elaborate.sml | |
parent | 83e134391f20103fb2ce74caebcefbc408ce9ee6 (diff) |
A little more conservative unification
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r-- | src/elaborate.sml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml index 7d246fa0..ceca9b4f 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -535,6 +535,11 @@ and consEq env (c1, c2) = true) handle CUnify _ => false +and consNeq env (c1, c2) = + case (#1 (hnormCon env c1), #1 (hnormCon env c2)) of + (L'.CName x1, L'.CName x2) => x1 <> x2 + | _ => false + and unifySummaries env (k, s1 : record_summary, s2 : record_summary) = let (*val () = eprefaces "Summaries" [("#1", p_summary env s1), @@ -563,7 +568,9 @@ and unifySummaries env (k, s1 : record_summary, s2 : record_summary) = end val (fs1, fs2) = eatMatching (fn ((x1, c1), (x2, c2)) => - consEq env (c1, c2) andalso consEq env (x1, x2)) + not (consNeq env (x1, x2)) + andalso consEq env (c1, c2) + andalso consEq env (x1, x2)) (#fields s1, #fields s2) (*val () = eprefaces "Summaries2" [("#1", p_summary env {fields = fs1, unifs = #unifs s1, others = #others s1}), ("#2", p_summary env {fields = fs2, unifs = #unifs s2, others = #others s2})]*) |