aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/elaborate.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-04-22 09:08:45 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-04-22 09:08:45 -0400
commit709a0a0b2187d9a1fdec11554d3fca38bcab9d5c (patch)
treec1200c981efceb399de0c4380b6886215a4d50aa /src/elaborate.sml
parent4ba39cb7e4cdc2231460043c1e5b7308a225329b (diff)
-unifyMore
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r--src/elaborate.sml14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index 1923390a..71f5196f 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -39,6 +39,7 @@
open ElabErr
val dumpTypes = ref false
+ val unifyMore = ref false
structure IS = IntBinarySet
structure IM = IntBinaryMap
@@ -4519,10 +4520,11 @@ fun elabFile basis topStr topSgn env file =
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 @@ fun elabFile basis topStr topSgn env file =
mayDelay := false;
- if ErrorMsg.anyErrors () then
+ if stopHere () then
()
else
(app (fn (loc, env, k, s1, s2) =>
@@ -4641,7 +4643,7 @@ fun elabFile basis topStr topSgn env file =
(!delayedUnifs);
delayedUnifs := []);
- if ErrorMsg.anyErrors () then
+ if stopHere () then
()
else
if List.exists kunifsInDecl file then
@@ -4651,7 +4653,7 @@ fun elabFile basis topStr topSgn env file =
else
();
- if ErrorMsg.anyErrors () then
+ if stopHere () then
()
else
if List.exists cunifsInDecl file then
@@ -4661,7 +4663,7 @@ fun elabFile basis topStr topSgn env file =
else
();
- if ErrorMsg.anyErrors () then
+ if stopHere () then
()
else
app (fn all as (env, _, _, loc) =>
@@ -4670,7 +4672,7 @@ fun elabFile basis topStr topSgn env file =
| SOME p => expError env (Inexhaustive (loc, p)))
(!delayedExhaustives);
- if ErrorMsg.anyErrors () then
+ if stopHere () then
()
else
!checkConstraintErrors ();