diff src/elaborate.sml @ 2043:e762c96fffb7

Small tweak to ordering of unification rules, to support better record matching
author Adam Chlipala <adam@chlipala.net>
date Tue, 29 Jul 2014 14:38:50 -0400
parents 403f0cc65b9c
children 42ae25a354f8
line wrap: on
line diff
--- a/src/elaborate.sml	Sat Jul 26 09:39:45 2014 -0400
+++ b/src/elaborate.sml	Tue Jul 29 14:38:50 2014 -0400
@@ -1220,6 +1220,11 @@
              else
                  err (fn _ => TooLifty (loc1, loc2))
 
+           | (L'.CRecord _, _) => isRecord ()
+           | (_, L'.CRecord _) => isRecord ()
+           | (L'.CConcat _, _) => isRecord ()
+           | (_, L'.CConcat _) => isRecord ()
+
            | (L'.CUnif (0, _, _, _, r as ref (L'.Unknown f)), _) =>
              if occursCon r c2All then
                  err COccursCheckFailed
@@ -1262,11 +1267,6 @@
                   end
                   handle CantSquish => err (fn _ => TooDeep))
 
-           | (L'.CRecord _, _) => isRecord ()
-           | (_, L'.CRecord _) => isRecord ()
-           | (L'.CConcat _, _) => isRecord ()
-           | (_, L'.CConcat _) => isRecord ()
-
 
            | (L'.CUnit, L'.CUnit) => ()