# HG changeset patch # User Adam Chlipala # Date 1325808811 18000 # Node ID de0a34e28bfaded69e61338cc370cfee01084fb9 # Parent 2b7d3d99dc425519e07217de75c9d1ef7e192e56 Tweak new unification heuristic diff -r 2b7d3d99dc42 -r de0a34e28bfa src/elaborate.sml --- a/src/elaborate.sml Thu Jan 05 17:10:43 2012 -0500 +++ b/src/elaborate.sml Thu Jan 05 19:13:31 2012 -0500 @@ -865,12 +865,15 @@ val (unifs1, unifs2) = eatMatching (fn ((_, r1), (_, r2)) => r1 = r2) (#unifs s1, #unifs s2) - val hasUnifs = U.Con.exists {kind = fn _ => false, - con = fn L'.CUnif _ => true - | _ => false} + fun isMappy (c, _) = + case c of + L'.CApp ((L'.CMap _, _), c) => isMappy c + | L'.CUnif _ => true + | _ => false val (others1, others2) = eatMatching (fn (c1, c2) => - not (hasUnifs c1 andalso hasUnifs c2) + not (isMappy c1 andalso isMappy c2) + (* I guess this is a pretty bad hack, based on one pattern of bad unification I've seen! *) andalso consEq env loc (c1, c2)) (#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})]*)