diff options
Diffstat (limited to 'proofs')
-rw-r--r-- | proofs/proof_global.ml | 1 | ||||
-rw-r--r-- | proofs/proof_global.mli | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index fc94a1013..833e34c33 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -146,6 +146,7 @@ let cur_pstate () = | [] -> raise NoCurrentProof let give_me_the_proof () = (cur_pstate ()).proof +let give_me_the_proof_opt () = try Some (give_me_the_proof ()) with | NoCurrentProof -> None let get_current_proof_name () = (cur_pstate ()).pid let with_current_proof f = diff --git a/proofs/proof_global.mli b/proofs/proof_global.mli index 27e99f218..29445a746 100644 --- a/proofs/proof_global.mli +++ b/proofs/proof_global.mli @@ -24,6 +24,7 @@ val discard : Names.Id.t Loc.located -> unit val discard_current : unit -> unit val discard_all : unit -> unit +val give_me_the_proof_opt : unit -> Proof.t option exception NoCurrentProof val give_me_the_proof : unit -> Proof.t (** @raise NoCurrentProof when outside proof mode. *) |