comparison src/elaborate.sml @ 1964:072656016dfa

Add another simple case for record unification between alpha-equivalent constructors
author Adam Chlipala <adam@chlipala.net>
date Wed, 29 Jan 2014 18:19:25 -0500
parents 006633a0039a
children 2c075e875a47
comparison
equal deleted inserted replaced
1963:fec7beec96c7 1964:072656016dfa
871 val hasUnifs = U.Con.exists {kind = fn _ => false, 871 val hasUnifs = U.Con.exists {kind = fn _ => false,
872 con = fn L'.CUnif _ => true 872 con = fn L'.CUnif _ => true
873 | _ => false} 873 | _ => false}
874 874
875 val (others1, others2) = eatMatching (fn (c1, c2) => 875 val (others1, others2) = eatMatching (fn (c1, c2) =>
876 not (hasUnifs c1 andalso hasUnifs c2) 876 c1 = c2
877 andalso consEq env loc (c1, c2)) (#others s1, #others s2) 877 orelse (not (hasUnifs c1 andalso hasUnifs c2)
878 andalso consEq env loc (c1, c2))) (#others s1, #others s2)
878 (*val () = eprefaces "Summaries3" [("#1", p_summary env {fields = fs1, unifs = unifs1, others = others1}), 879 (*val () = eprefaces "Summaries3" [("#1", p_summary env {fields = fs1, unifs = unifs1, others = others1}),
879 ("#2", p_summary env {fields = fs2, unifs = unifs2, others = others2})]*) 880 ("#2", p_summary env {fields = fs2, unifs = unifs2, others = others2})]*)
880 881
881 fun unsummarize {fields, unifs, others} = 882 fun unsummarize {fields, unifs, others} =
882 let 883 let