aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-02-10 17:41:01 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-02-10 18:04:10 +0100
commit98041625b841bad9bdc37329279cf84c2e9701b3 (patch)
tree5c07b1919ad82fbc0f417cb7d544aa36459c53ac
parentc50d3830ae92735383e201e72b499b8bff0918c7 (diff)
STM: fix valid_id coming from Qed errors
-rw-r--r--lib/future.ml2
-rw-r--r--lib/future.mli4
-rw-r--r--proofs/proof_global.ml2
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/future.ml b/lib/future.ml
index b6cb498c6..c54b4e8db 100644
--- a/lib/future.ml
+++ b/lib/future.ml
@@ -50,7 +50,7 @@ and 'a computation = 'a comput ref
let create f x = ref (Ongoing (Ephemeron.create (f, Pervasives.ref x)))
let get x =
match !x with
- | Finished v -> (fun x -> x), ref( Val (v,None))
+ | Finished v -> id, ref( Val (v,None))
| Ongoing x ->
try Ephemeron.get x
with Ephemeron.InvalidKey -> (fun x -> x), ref (Exn NotHere)
diff --git a/lib/future.mli b/lib/future.mli
index 4f27767ba..4dca2f144 100644
--- a/lib/future.mli
+++ b/lib/future.mli
@@ -111,7 +111,9 @@ val chain : ?greedy:bool -> pure:bool ->
val force : 'a computation -> 'a
val compute : 'a computation -> 'a value
-(* Final call, no more *inpure* chain allowed since the state is lost *)
+(* Final call, no more *inpure* chain allowed since the state is lost.
+ * Also the fix_exn function is lost, hence error reporting can be incomplete
+ * in a computation obtained by chaining on a joined future. *)
val join : 'a computation -> 'a
(*** Utility functions ************************************************* ***)
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index 002810cda..bbe8ad531 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -301,7 +301,7 @@ let close_proof ?feedback_id ~now fpl =
const_entry_opaque = true })
fpl initial_goals in
if now then
- List.iter (fun x -> ignore(Future.join x.Entries.const_entry_body)) entries;
+ List.iter (fun x ->ignore(Future.force x.Entries.const_entry_body)) entries;
{ id = pid; entries = entries; persistence = strength },
Ephemeron.get terminator