From 709a0a0b2187d9a1fdec11554d3fca38bcab9d5c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 22 Apr 2012 09:08:45 -0400 Subject: -unifyMore --- src/elaborate.sml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/elaborate.sml') 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 (); -- cgit v1.2.3