comparison src/elaborate.sml @ 79:37847b504cc6

More hardcore unification
author Adam Chlipala <adamc@hcoop.net>
date Sun, 29 Jun 2008 11:20:34 -0400
parents a6d45c6819c9
children 321cb9805c8e
comparison
equal deleted inserted replaced
78:a6d45c6819c9 79:37847b504cc6
561 in 561 in
562 em (ls1, ls2, []) 562 em (ls1, ls2, [])
563 end 563 end
564 564
565 val (fs1, fs2) = eatMatching (fn ((x1, c1), (x2, c2)) => 565 val (fs1, fs2) = eatMatching (fn ((x1, c1), (x2, c2)) =>
566 if consEq env (x1, x2) then 566 consEq env (c1, c2) andalso consEq env (x1, x2))
567 (unifyCons env c1 c2; 567 (#fields s1, #fields s2)
568 true)
569 else
570 false) (#fields s1, #fields s2)
571 (*val () = eprefaces "Summaries2" [("#1", p_summary env {fields = fs1, unifs = #unifs s1, others = #others s1}), 568 (*val () = eprefaces "Summaries2" [("#1", p_summary env {fields = fs1, unifs = #unifs s1, others = #others s1}),
572 ("#2", p_summary env {fields = fs2, unifs = #unifs s2, others = #others s2})]*) 569 ("#2", p_summary env {fields = fs2, unifs = #unifs s2, others = #others s2})]*)
573 val (unifs1, unifs2) = eatMatching (fn ((_, r1), (_, r2)) => r1 = r2) (#unifs s1, #unifs s2) 570 val (unifs1, unifs2) = eatMatching (fn ((_, r1), (_, r2)) => r1 = r2) (#unifs s1, #unifs s2)
574 val (others1, others2) = eatMatching (consEq env) (#others s1, #others s2) 571 val (others1, others2) = eatMatching (consEq env) (#others s1, #others s2)
575 572