diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-08-19 17:24:54 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-09-08 12:02:50 +0200 |
commit | 6a246d5d5ec12f618d241407092691595b4f733b (patch) | |
tree | d233085192d743be46c5d2be9bdf83e4ac0159aa /proofs | |
parent | 57d3411748482d783913a6078a0228249e3235b0 (diff) |
Opacifying the proof_terminator type.
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 d024c01ba..e48a336a6 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 c02b90916..10e7b758d 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 b5dd5ef85..995e90efc 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 |