aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2013-11-27 18:59:16 +0100
committerPierre-Marie Pédrot2013-11-27 18:59:16 +0100
commitd400485650323689f9e09d202dfefe24e3ecfaac (patch)
tree68942f69e34c02b2f21dd6232865266168a92d91
parent8c962c46397d707435834d6765d1c243a844babd (diff)
Fixing abstract tactic by using a dummy name out of a declared proof.
-rw-r--r--tactics/tactics.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 7e65e20c5f..969f9ef553 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -3851,10 +3851,15 @@ let abstract_subproof id tac gl =
success). Hence it reraises [e]. *)
raise e
+let anon_id = Id.of_string "anonymous"
+
let tclABSTRACT name_op tac gl =
+ let open Proof_global in
let s = match name_op with
| Some s -> s
- | None -> add_suffix (get_current_proof_name ()) "_subproof"
+ | None ->
+ let name = try get_current_proof_name () with NoCurrentProof -> anon_id in
+ add_suffix name "_subproof"
in
abstract_subproof s tac gl