changeset 1346:faad7d01b200

Restore behavior of not complaining about undetermined unification variables when there are other errors
author Adam Chlipala <adam@chlipala.net>
date Thu, 16 Dec 2010 18:40:49 -0500 (2010-12-16)
parents 9e0fa4f6ac93
children b106ca8200b1
files src/elaborate.sml
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/elaborate.sml	Thu Dec 16 13:35:40 2010 -0500
+++ b/src/elaborate.sml	Thu Dec 16 18:40:49 2010 -0500
@@ -4408,16 +4408,22 @@
                  (!delayedUnifs);
              delayedUnifs := []);
 
-        ignore (List.exists (fn d => if kunifsInDecl d then
-                                         (declError env'' (KunifsRemain [d]);
-                                          true)
-                                     else
-                                         false) file);
+        if ErrorMsg.anyErrors () then
+            ()
+        else
+            ignore (List.exists (fn d => if kunifsInDecl d then
+                                             (declError env'' (KunifsRemain [d]);
+                                              true)
+                                         else
+                                             false) file);
         
-        ignore (List.exists (fn d => case cunifsInDecl d of
-                                         NONE => false
-                                       | SOME _ => (declError env'' (CunifsRemain [d]);
-                                                    true)) file);
+        if ErrorMsg.anyErrors () then
+            ()
+        else
+            ignore (List.exists (fn d => case cunifsInDecl d of
+                                             NONE => false
+                                           | SOME _ => (declError env'' (CunifsRemain [d]);
+                                                        true)) file);
 
         if ErrorMsg.anyErrors () then
             ()