diff options
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/pfedit.ml | 3 | ||||
| -rw-r--r-- | proofs/proof_global.ml | 3 | ||||
| -rw-r--r-- | proofs/proof_global.mli | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml index d024c01ba5..e48a336a6e 100644 --- a/proofs/pfedit.ml +++ b/proofs/pfedit.ml @@ -134,7 +134,8 @@ let next = let n = ref 0 in fun () -> incr n; !n let build_constant_by_tactic id ctx sign ?(goal_kind = Global, false, Proof Theorem) typ tac = let evd = Evd.from_env ~ctx Environ.empty_env in - start_proof id goal_kind evd sign typ (fun _ -> ()); + let terminator = Proof_global.make_terminator (fun _ -> ()) in + start_proof id goal_kind evd sign typ terminator; try let status = by tac in let _,(const,univs,_) = cook_proof () in diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index c02b909164..10e7b758da 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -91,6 +91,9 @@ type pstate = { mode : proof_mode Ephemeron.key; } +let make_terminator f = f +let apply_terminator f = f + (* The head of [!pstates] is the actual current proof, the other ones are to be resumed when the current proof is closed or aborted. *) let pstates = ref ([] : pstate list) diff --git a/proofs/proof_global.mli b/proofs/proof_global.mli index b5dd5ef85f..995e90efcc 100644 --- a/proofs/proof_global.mli +++ b/proofs/proof_global.mli @@ -70,9 +70,12 @@ type proof_ending = | Proved of Vernacexpr.opacity_flag * (Vernacexpr.lident * Decl_kinds.theorem_kind option) option * proof_object -type proof_terminator = proof_ending -> unit +type proof_terminator type closed_proof = proof_object * proof_terminator +val make_terminator : (proof_ending -> unit) -> proof_terminator +val apply_terminator : proof_terminator -> proof_ending -> unit + (** [start_proof id str goals terminator] starts a proof of name [id] with goals [goals] (a list of pairs of environment and conclusion); [str] describes what kind of theorem/definition this |
