From c6cd7c39fc0da9c578cac57c9d06ddb28f0586fd Mon Sep 17 00:00:00 2001 From: Gaëtan Gilbert Date: Wed, 19 Sep 2018 14:14:03 +0200 Subject: Move attributes out of vernacinterp to new attributes module --- plugins/ssr/ssrvernac.mlg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/ssr') diff --git a/plugins/ssr/ssrvernac.mlg b/plugins/ssr/ssrvernac.mlg index 940defb743..2f44624d36 100644 --- a/plugins/ssr/ssrvernac.mlg +++ b/plugins/ssr/ssrvernac.mlg @@ -172,7 +172,7 @@ let declare_one_prenex_implicit locality f = VERNAC COMMAND EXTEND Ssrpreneximplicits CLASSIFIED AS SIDEFF | [ "Prenex" "Implicits" ne_global_list(fl) ] -> { - let open Vernacinterp in + let open Attributes in let locality = Locality.make_section_locality atts.locality in List.iter (declare_one_prenex_implicit locality) fl; } -- cgit v1.2.3 From 8db938764d87cceee6669b339e0f995edd40fc3e Mon Sep 17 00:00:00 2001 From: Gaëtan Gilbert Date: Thu, 20 Sep 2018 16:48:54 +0200 Subject: Command driven attributes. Commands need to request the attributes they use, with the API encouraging them to error on unsupported attributes. --- plugins/ssr/ssrvernac.mlg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/ssr') diff --git a/plugins/ssr/ssrvernac.mlg b/plugins/ssr/ssrvernac.mlg index 2f44624d36..2774b843aa 100644 --- a/plugins/ssr/ssrvernac.mlg +++ b/plugins/ssr/ssrvernac.mlg @@ -173,7 +173,7 @@ VERNAC COMMAND EXTEND Ssrpreneximplicits CLASSIFIED AS SIDEFF | [ "Prenex" "Implicits" ne_global_list(fl) ] -> { let open Attributes in - let locality = Locality.make_section_locality atts.locality in + let locality = Locality.make_section_locality (only_locality atts) in List.iter (declare_one_prenex_implicit locality) fl; } END -- cgit v1.2.3 From 0a478031f0213ef74c3649ea1a8d58aa89e54416 Mon Sep 17 00:00:00 2001 From: Gaëtan Gilbert Date: Tue, 16 Oct 2018 14:42:53 +0200 Subject: coqpp VERNAC EXTEND uses #[ att = attribute; ] syntax I think for instance the new code in this diff is cleaner and more systematic: ~~~diff VERNAC COMMAND EXTEND VernacDeclareTacticDefinition -| [ "Ltac" ne_ltac_tacdef_body_list_sep(l, "with") ] => { +| #[ deprecation; locality; ] [ "Ltac" ne_ltac_tacdef_body_list_sep(l, "with") ] => { VtSideff (List.map (function | TacticDefinition ({CAst.v=r},_) -> r | TacticRedefinition (qid,_) -> qualid_basename qid) l), VtLater } -> { - let deprecation, locality = Attributes.(parse Notations.(deprecation ++ locality) atts) in Tacentries.register_ltac (Locality.make_module_locality locality) ?deprecation l; } END ~~~ --- plugins/ssr/ssrvernac.mlg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/ssr') diff --git a/plugins/ssr/ssrvernac.mlg b/plugins/ssr/ssrvernac.mlg index 2774b843aa..4ed75cdbe4 100644 --- a/plugins/ssr/ssrvernac.mlg +++ b/plugins/ssr/ssrvernac.mlg @@ -170,10 +170,9 @@ let declare_one_prenex_implicit locality f = } VERNAC COMMAND EXTEND Ssrpreneximplicits CLASSIFIED AS SIDEFF - | [ "Prenex" "Implicits" ne_global_list(fl) ] + | #[ locality = Attributes.locality; ] [ "Prenex" "Implicits" ne_global_list(fl) ] -> { - let open Attributes in - let locality = Locality.make_section_locality (only_locality atts) in + let locality = Locality.make_section_locality locality in List.iter (declare_one_prenex_implicit locality) fl; } END -- cgit v1.2.3