diff options
author | aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-20 12:26:45 +0000 |
---|---|---|
committer | aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-20 12:26:45 +0000 |
commit | 62a474168c3416777138615c469560fcb85b86fc (patch) | |
tree | cf162147bf00eca428b5f47e0955e31eed589630 /toplevel | |
parent | 2d4b9ba3317a11c6af2ad783bfb2a08e7123ac6d (diff) |
Corrects bug #2959 (error during Qed leads to assertion failure).
Well-placed [Proof.transaction]-s do the trick.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16225 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r-- | toplevel/lemmas.ml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/toplevel/lemmas.ml b/toplevel/lemmas.ml index 694403c9e..65655ed90 100644 --- a/toplevel/lemmas.ml +++ b/toplevel/lemmas.ml @@ -234,23 +234,32 @@ let get_proof opacity = id,{const with const_entry_opaque = opacity},do_guard,persistence,hook let save_named opacity = - let id,const,do_guard,persistence,hook = get_proof opacity in - save id const do_guard persistence hook + let p = Proof_global.give_me_the_proof () in + Proof.transaction p begin fun () -> + let id,const,do_guard,persistence,hook = get_proof opacity in + save id const do_guard persistence hook + end let check_anonymity id save_ident = if not (String.equal (atompart_of_id id) (Id.to_string (default_thm_id))) then error "This command can only be used for unnamed theorem." let save_anonymous opacity save_ident = - let id,const,do_guard,persistence,hook = get_proof opacity in - check_anonymity id save_ident; - save save_ident const do_guard persistence hook + let p = Proof_global.give_me_the_proof () in + Proof.transaction p begin fun () -> + let id,const,do_guard,persistence,hook = get_proof opacity in + check_anonymity id save_ident; + save save_ident const do_guard persistence hook + end let save_anonymous_with_strength kind opacity save_ident = - let id,const,do_guard,_,hook = get_proof opacity in - check_anonymity id save_ident; - (* we consider that non opaque behaves as local for discharge *) - save save_ident const do_guard (Global, Proof kind) hook + let p = Proof_global.give_me_the_proof () in + Proof.transaction p begin fun () -> + let id,const,do_guard,_,hook = get_proof opacity in + check_anonymity id save_ident; + (* we consider that non opaque behaves as local for discharge *) + save save_ident const do_guard (Global, Proof kind) hook + end (* Starting a goal *) |