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/firstorder/g_ground.mlg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/firstorder') diff --git a/plugins/firstorder/g_ground.mlg b/plugins/firstorder/g_ground.mlg index c41687e721..5a4cda54b2 100644 --- a/plugins/firstorder/g_ground.mlg +++ b/plugins/firstorder/g_ground.mlg @@ -74,7 +74,7 @@ let (set_default_solver, default_solver, print_default_solver) = VERNAC COMMAND EXTEND Firstorder_Set_Solver CLASSIFIED AS SIDEFF | [ "Set" "Firstorder" "Solver" tactic(t) ] -> { - let open Vernacinterp in + let open Attributes in set_default_solver (Locality.make_section_locality atts.locality) (Tacintern.glob_tactic t) -- 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/firstorder/g_ground.mlg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/firstorder') diff --git a/plugins/firstorder/g_ground.mlg b/plugins/firstorder/g_ground.mlg index 5a4cda54b2..14a3acad57 100644 --- a/plugins/firstorder/g_ground.mlg +++ b/plugins/firstorder/g_ground.mlg @@ -76,7 +76,7 @@ VERNAC COMMAND EXTEND Firstorder_Set_Solver CLASSIFIED AS SIDEFF | [ "Set" "Firstorder" "Solver" tactic(t) ] -> { let open Attributes in set_default_solver - (Locality.make_section_locality atts.locality) + (Locality.make_section_locality (only_locality atts)) (Tacintern.glob_tactic t) } 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/firstorder/g_ground.mlg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/firstorder') diff --git a/plugins/firstorder/g_ground.mlg b/plugins/firstorder/g_ground.mlg index 14a3acad57..b9274cf6b8 100644 --- a/plugins/firstorder/g_ground.mlg +++ b/plugins/firstorder/g_ground.mlg @@ -20,6 +20,7 @@ open Tacticals.New open Tacinterp open Stdarg open Tacarg +open Attributes open Pcoq.Prim } @@ -73,10 +74,9 @@ let (set_default_solver, default_solver, print_default_solver) = } VERNAC COMMAND EXTEND Firstorder_Set_Solver CLASSIFIED AS SIDEFF -| [ "Set" "Firstorder" "Solver" tactic(t) ] -> { - let open Attributes in +| #[ locality; ] [ "Set" "Firstorder" "Solver" tactic(t) ] -> { set_default_solver - (Locality.make_section_locality (only_locality atts)) + (Locality.make_section_locality locality) (Tacintern.glob_tactic t) } END -- cgit v1.2.3