aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
authorherbelin2011-04-08 14:23:53 +0000
committerherbelin2011-04-08 14:23:53 +0000
commitae6c56036f05b10b8ec728f474f4fe04ba90c752 (patch)
tree84552c6363dc73449c359e0c9bca926ef3225c3d /proofs
parent12fe4b7af1170d00963277a29fd6acc1123aa6d9 (diff)
Applying Tom Prince's patch for build_constant_by_tactic not able to
use a lemma name chosen by the caller (here tclABSTRACT) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13972 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
-rw-r--r--proofs/pfedit.ml6
-rw-r--r--proofs/pfedit.mli2
2 files changed, 4 insertions, 4 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml
index 6466bb8661..fff1a121d6 100644
--- a/proofs/pfedit.ml
+++ b/proofs/pfedit.ml
@@ -150,8 +150,7 @@ open Decl_kinds
let next = let n = ref 0 in fun () -> incr n; !n
-let build_constant_by_tactic sign typ tac =
- let id = id_of_string ("temporary_proof"^string_of_int (next())) in
+let build_constant_by_tactic id sign typ tac =
start_proof id (Global,Proof Theorem) sign typ (fun _ _ -> ());
try
by tac;
@@ -163,5 +162,6 @@ let build_constant_by_tactic sign typ tac =
raise e
let build_by_tactic typ tac =
+ let id = id_of_string ("temporary_proof"^string_of_int (next())) in
let sign = Decls.clear_proofs (Global.named_context ()) in
- (build_constant_by_tactic sign typ tac).const_entry_body
+ (build_constant_by_tactic id sign typ tac).const_entry_body
diff --git a/proofs/pfedit.mli b/proofs/pfedit.mli
index dde52d0ccb..c16445ba3c 100644
--- a/proofs/pfedit.mli
+++ b/proofs/pfedit.mli
@@ -180,6 +180,6 @@ val instantiate_nth_evar_com : int -> Topconstr.constr_expr -> unit
(** [build_by_tactic typ tac] returns a term of type [typ] by calling [tac] *)
-val build_constant_by_tactic : named_context_val -> types -> tactic ->
+val build_constant_by_tactic : identifier -> named_context_val -> types -> tactic ->
Entries.definition_entry
val build_by_tactic : types -> tactic -> constr