diff options
| author | Gaƫtan Gilbert | 2019-05-21 13:52:52 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2019-06-04 13:58:43 +0200 |
| commit | 80602ad2acb5f497594b2e76b03b73a080847a07 (patch) | |
| tree | d6f091e34e0e7a8c7e14d282b571b5f7808f4faf /vernac | |
| parent | 99154fcb97653c606d2e62e0a0521c4afddff44c (diff) | |
Replace ModifyProofStack by CloseProof
The only use of ModifyProofStack was in paramcoq for closing a proof.
Diffstat (limited to 'vernac')
| -rw-r--r-- | vernac/vernacentries.ml | 7 | ||||
| -rw-r--r-- | vernac/vernacentries.mli | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index c88de1181a..77e8a92cc1 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -2714,7 +2714,7 @@ let interp ?(verbosely=true) ?proof ~st cmd = type functional_vernac = | VtDefault of (unit -> unit) - | VtModifyProofStack of (pstate:Proof_global.stack option -> Proof_global.stack option) + | VtCloseProof of (pstate:Proof_global.t -> unit) | VtMaybeOpenProof of (unit -> Proof_global.t option) | VtOpenProof of (unit -> Proof_global.t) | VtModifyProof of (pstate:Proof_global.t -> Proof_global.t) @@ -2725,7 +2725,10 @@ let interp_functional_vernac c ~pstate = let open Proof_global in match c with | VtDefault f -> f (); pstate - | VtModifyProofStack f -> f ~pstate + | VtCloseProof f -> + vernac_require_open_proof ~pstate (fun ~pstate -> + f ~pstate:(Proof_global.get_current_pstate pstate); + Proof_global.discard_current pstate) | VtMaybeOpenProof f -> let proof = f () in let pstate = maybe_push ~ontop:pstate proof in diff --git a/vernac/vernacentries.mli b/vernac/vernacentries.mli index 06a08e5e6b..ca3a962319 100644 --- a/vernac/vernacentries.mli +++ b/vernac/vernacentries.mli @@ -56,7 +56,7 @@ val test_mode : bool ref type functional_vernac = | VtDefault of (unit -> unit) - | VtModifyProofStack of (pstate:Proof_global.stack option -> Proof_global.stack option) + | VtCloseProof of (pstate:Proof_global.t -> unit) | VtMaybeOpenProof of (unit -> Proof_global.t option) | VtOpenProof of (unit -> Proof_global.t) | VtModifyProof of (pstate:Proof_global.t -> Proof_global.t) |
