diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 12:44:40 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 12:44:40 -0400 |
commit | 18c2f489867bf282c49346eb090b22e41ec5f67a (patch) | |
tree | 82f3cb492c30ab735fe779934eca0e58a1e6b461 /src/elaborate.sml | |
parent | 998ec0f6506d8b7065fbe277c253188b38bcac7c (diff) |
ListEdit demo, minus prose
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r-- | src/elaborate.sml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml index c55593b4..5e94d8e4 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -704,7 +704,16 @@ (#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})]*) + val (unifs1, unifs2) = eatMatching (fn ((_, r1), (_, r2)) => r1 = r2) (#unifs s1, #unifs s2) + fun eatMost unifs = + case unifs of + (_, r) :: (rest as _ :: _) => (r := SOME (L'.CRecord (k, []), loc); + eatMost rest) + | _ => unifs + val unifs1 = eatMost unifs1 + val unifs2 = eatMost unifs2 + val (others1, others2) = eatMatching (consEq env) (#others s1, #others s2) (*val () = eprefaces "Summaries3" [("#1", p_summary env {fields = fs1, unifs = unifs1, others = others1}), ("#2", p_summary env {fields = fs2, unifs = unifs2, others = others2})]*) @@ -761,7 +770,7 @@ | _ => (fs1, fs2, others1, others2) (*val () = eprefaces "Summaries5" [("#1", p_summary env {fields = fs1, unifs = unifs1, others = others1}), - ("#2", p_summary env {fields = fs2, unifs = unifs2, others = others2})]*) + ("#2", p_summary env {fields = fs2, unifs = unifs2, others = others2})]*) val clear = case (fs1, others1, fs2, others2) of ([], [], [], []) => true |