aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorHugo Herbelin2019-05-24 20:53:14 +0200
committerHugo Herbelin2019-06-16 20:58:50 +0200
commit459b5ce5b2b825db43d645357f83d7fe17289bc5 (patch)
tree45dd0a7a3d07bda0292c5f4bedd1b9e0bae858a1 /parsing
parent6eba5b5ba91f9ec02b809e0c223324e0f4fdbf85 (diff)
Deprecate "intro_pattern" in tactic notations in favor of "simple_intropattern".
This is to prevent confusion with the terminology used in the grammar of tactic in the reference manual: "intropattern" in Tactic Notation and TACTIC EXTEND is actually bound to simple_intropattern and not to what is called intropattern in the reference manual After some deprecation phase, "intropattern" could be added back to mean the "intropattern" of the reference manual. Note that "simple_intropattern" is actually already available in "Tactic Notation" with the correct meaning as an entry. Only "intropattern" is misguiding.
Diffstat (limited to 'parsing')
-rw-r--r--parsing/pcoq.ml15
1 files changed, 14 insertions, 1 deletions
diff --git a/parsing/pcoq.ml b/parsing/pcoq.ml
index b375c526ad..b9ba61b7f3 100644
--- a/parsing/pcoq.ml
+++ b/parsing/pcoq.ml
@@ -363,8 +363,21 @@ end
module Grammar = Register(GrammarObj)
+let warn_deprecated_intropattern =
+ let open CWarnings in
+ create ~name:"deprecated-intropattern-entry" ~category:"deprecated"
+ (fun () -> Pp.strbrk "Entry name intropattern has been renamed in order \
+ to be consistent with the documented grammar of tactics. Use \
+ \"simple_intropattern\" instead.")
+
+let check_compatibility = function
+ | Genarg.ExtraArg s when ArgT.repr s = "intropattern" -> warn_deprecated_intropattern ()
+ | _ -> ()
+
let register_grammar = Grammar.register0
-let genarg_grammar = Grammar.obj
+let genarg_grammar x =
+ check_compatibility x;
+ Grammar.obj x
let create_generic_entry (type a) u s (etyp : a raw_abstract_argument_type) : a Entry.t =
let e = new_entry u s in