thm_proof: replaced lazy by composed futures;
authorwenzelm
Tue, 27 Jan 2009 00:42:12 +0100
changeset 29636 d01bada1df33
parent 29635 31d14e9fa0da
child 29637 da018485b89d
child 29638 1f8f3d26a2cf
thm_proof: replaced lazy by composed futures;
src/Pure/proofterm.ML
src/Pure/thm.ML
--- a/src/Pure/proofterm.ML	Tue Jan 27 00:29:37 2009 +0100
+++ b/src/Pure/proofterm.ML	Tue Jan 27 00:42:12 2009 +0100
@@ -110,7 +110,7 @@
   val promise_proof: theory -> serial -> term -> proof
   val fulfill_proof: theory -> (serial * proof) list -> proof_body -> proof_body
   val thm_proof: theory -> string -> term list -> term ->
-    (serial * proof) list lazy -> proof_body -> pthm * proof
+    (serial * proof future) list -> proof_body -> pthm * proof
   val get_name: term list -> term -> proof -> string
 
   (** rewriting on proof terms **)
@@ -1245,8 +1245,9 @@
       else MinProof;
 
     fun new_prf () = (serial (), name, prop,
-      Future.fork_pri ~2 (fn () => fulfill_proof thy (Lazy.force promises)
-        (PBody {oracles = oracles0, thms = thms0, proof = proof0})));
+      Future.fork_deps (map snd promises) (fn () =>
+        fulfill_proof thy (map (apsnd Future.join) promises)
+          (PBody {oracles = oracles0, thms = thms0, proof = proof0})));
 
     val (i, name, prop, body') =
       (case strip_combt (fst (strip_combP prf)) of
--- a/src/Pure/thm.ML	Tue Jan 27 00:29:37 2009 +0100
+++ b/src/Pure/thm.ML	Tue Jan 27 00:42:12 2009 +0100
@@ -1658,7 +1658,7 @@
     val {thy_ref, hyps, prop, tpairs, ...} = args;
     val _ = null tpairs orelse raise THM ("put_name: unsolved flex-flex constraints", 0, [thm]);
 
-    val ps = Lazy.lazy (fn () => map (apsnd (proof_of o Future.join)) promises);
+    val ps = map (apsnd (Future.map proof_of)) promises;
     val thy = Theory.deref thy_ref;
     val (pthm, proof) = Pt.thm_proof thy name hyps prop ps body;