From 459b5ce5b2b825db43d645357f83d7fe17289bc5 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 24 May 2019 20:53:14 +0200 Subject: 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. --- parsing/pcoq.ml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'parsing') 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 -- cgit v1.2.3