aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
Diffstat (limited to 'proofs')
-rw-r--r--proofs/proof_global.ml6
-rw-r--r--proofs/proof_global.mli5
2 files changed, 11 insertions, 0 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index 809ed41c7e..c303f486c5 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -695,3 +695,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 f8615e8499..a22545080b 100644
--- a/proofs/proof_global.mli
+++ b/proofs/proof_global.mli
@@ -89,6 +89,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