diff src/elaborate.sml @ 1723:5ecf67553da8

-unifyMore
author Adam Chlipala <adam@chlipala.net>
date Sun, 22 Apr 2012 09:08:45 -0400
parents 0bafdfae2ac7
children 4a03aa3251cb
line wrap: on
line diff
--- a/src/elaborate.sml	Sat Apr 21 15:47:02 2012 -0400
+++ b/src/elaborate.sml	Sun Apr 22 09:08:45 2012 -0400
@@ -39,6 +39,7 @@
  open ElabErr
 
  val dumpTypes = ref false
+ val unifyMore = ref false
 
  structure IS = IntBinarySet
  structure IM = IntBinaryMap
@@ -4519,10 +4520,11 @@
                 end
 
         val checkConstraintErrors = ref (fn () => ())
+        fun stopHere () = not (!unifyMore) andalso ErrorMsg.anyErrors ()
     in
         oneSummaryRound ();
 
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             let
@@ -4625,7 +4627,7 @@
 
         mayDelay := false;
 
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             (app (fn (loc, env, k, s1, s2) =>
@@ -4641,7 +4643,7 @@
                  (!delayedUnifs);
              delayedUnifs := []);
 
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             if List.exists kunifsInDecl file then
@@ -4651,7 +4653,7 @@
             else
                 ();
         
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             if List.exists cunifsInDecl file then
@@ -4661,7 +4663,7 @@
             else
                 ();
 
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             app (fn all as (env, _, _, loc) =>
@@ -4670,7 +4672,7 @@
                       | SOME p => expError env (Inexhaustive (loc, p)))
                 (!delayedExhaustives);
 
-        if ErrorMsg.anyErrors () then
+        if stopHere () then
             ()
         else
             !checkConstraintErrors ();