thm_proof: recovered single-threaded version;
authorwenzelm
Tue, 27 Jan 2009 14:28:51 +0100
changeset 29642 be22ba214475
parent 29641 08d462dbb1a9
child 29643 5e0df4b6849e
thm_proof: recovered single-threaded version;
src/Pure/proofterm.ML
--- a/src/Pure/proofterm.ML	Tue Jan 27 13:52:32 2009 +0100
+++ b/src/Pure/proofterm.ML	Tue Jan 27 14:28:51 2009 +0100
@@ -1227,6 +1227,11 @@
         val proof = rewrite_prf fst (rules, K fill :: procs) proof0;
       in PBody {oracles = oracles, thms = thms, proof = proof} end;
 
+fun fulfill_proof_future _ [] body = Future.value body
+  | fulfill_proof_future thy promises body =
+      Future.fork_deps (map snd promises) (fn () =>
+        fulfill_proof thy (map (apsnd Future.join) promises) body);
+
 
 (***** theorems *****)
 
@@ -1243,12 +1248,9 @@
       if ! proofs = 2 then
         #4 (shrink_proof thy [] 0 (rew_proof thy (fold_rev implies_intr_proof hyps prf)))
       else MinProof;
+    val body0 = PBody {oracles = oracles0, thms = thms0, proof = proof0};
 
-    fun new_prf () = (serial (), name, prop,
-      Future.fork_deps (map snd promises) (fn () =>
-        fulfill_proof thy (map (apsnd Future.join) promises)
-          (PBody {oracles = oracles0, thms = thms0, proof = proof0})));
-
+    fun new_prf () = (serial (), name, prop, fulfill_proof_future thy promises body0);
     val (i, name, prop, body') =
       (case strip_combt (fst (strip_combP prf)) of
         (PThm (i, ((old_name, prop', NONE), body')), args') =>