diff options
| author | Pierre-Marie Pédrot | 2015-10-30 19:32:28 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2015-10-30 19:35:49 +0100 |
| commit | 35afb42a6bb30634d2eb77a32002ed473633b5f4 (patch) | |
| tree | 464483d6ef42aa817793297c5ac146d4b68307d8 /proofs | |
| parent | bf1eef119ef8f0e6a2ae4b66165d6e22c1ce9236 (diff) | |
| parent | b49c80406f518d273056b2143f55e23deeea2813 (diff) | |
Merge branch 'v8.5'
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/proof_global.ml | 6 | ||||
| -rw-r--r-- | proofs/proof_global.mli | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index e036ae3a15..1e0de05dd1 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -703,3 +703,9 @@ let copy_terminators ~src ~tgt = assert(List.length src = List.length tgt); List.map2 (fun op p -> { p with terminator = op.terminator }) src tgt +let update_global_env () = + with_current_proof (fun _ p -> + Proof.in_proof p (fun sigma -> + let tac = Proofview.Unsafe.tclEVARS (Evd.update_sigma_env sigma (Global.env ())) in + let (p,(status,info)) = Proof.run_tactic (Global.env ()) tac p in + (p, ()))) diff --git a/proofs/proof_global.mli b/proofs/proof_global.mli index a67481e71c..3fbcefd0a4 100644 --- a/proofs/proof_global.mli +++ b/proofs/proof_global.mli @@ -92,6 +92,11 @@ val start_dependent_proof : Names.Id.t -> Decl_kinds.goal_kind -> Proofview.telescope -> proof_terminator -> unit +(** Update the proofs global environment after a side-effecting command + (e.g. a sublemma definition) has been run inside it. Assumes + there_are_pending_proofs. *) +val update_global_env : unit -> unit + (* Takes a function to add to the exceptions data relative to the state in which the proof was built *) val close_proof : keep_body_ucst_separate:bool -> Future.fix_exn -> closed_proof |
