PARALLEL_GOALS: proper scope for exception FAILED, with dummy argument to prevent its interpretation as variable;
authorwenzelm
Wed, 30 Sep 2009 22:26:47 +0200
changeset 32788 a65deb8f9434
parent 32787 4271aab3aa4a
child 32789 d89327de0b3c
PARALLEL_GOALS: proper scope for exception FAILED, with dummy argument to prevent its interpretation as variable;
src/Pure/goal.ML
--- a/src/Pure/goal.ML	Wed Sep 30 22:26:25 2009 +0200
+++ b/src/Pure/goal.ML	Wed Sep 30 22:26:47 2009 +0200
@@ -300,22 +300,22 @@
   | SOME st' => Seq.single st');
 
 (*parallel refinement of non-schematic goal by single results*)
+exception FAILED of unit;
 fun PARALLEL_GOALS tac st =
   let
     val st0 = Thm.adjust_maxidx_thm ~1 st;
     val _ = Thm.maxidx_of st0 >= 0 andalso
       raise THM ("PARALLEL_GOALS: schematic goal state", 0, [st]);
 
-    exception FAILED;
     fun try_tac g =
       (case SINGLE tac g of
-        NONE => raise FAILED
+        NONE => raise FAILED ()
       | SOME g' => g');
 
     val goals = Drule.strip_imp_prems (Thm.cprop_of st0);
     val results = Par_List.map (try_tac o init) goals;
   in ALLGOALS (fn i => retrofit i 1 (nth results (i - 1))) st0 end
-  handle FAILED => Seq.empty;
+  handle FAILED () => Seq.empty;
 
 end;