aboutsummaryrefslogtreecommitdiff
path: root/plugins/funind
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-03-18 01:39:32 +0100
committerPierre-Marie Pédrot2016-03-18 01:39:32 +0100
commitb4b98349d03c31227d0d86a6e3acda8c3cd5212c (patch)
tree9e4d24d9bf13dbdeaf53dcfc025604f09890b078 /plugins/funind
parente3e8a4065047e254f5f5c2747227db75f01b7bed (diff)
parentf8f1f9d38bf2d35b0dc69fbf2e8ebbfc04b1a82d (diff)
Rationalizing the use of the various EXTEND macros.
Those macros used to handle in a special way the grammar entries and generic arguments known statically from Coq, i.e. defined before Pcoq. This was hardly predictible and very implementation-dependent. We made the EXTEND macros much more light-weight by treating in a uniform way all entries and arguments. Now, they are all produced by outputing the name as-is for entries and as "wit_$name" for genargs, thus letting the scope of the ML code decide which entrie is going to be taken. This is documented in the dev/ changelog. This also allows to get rid of a lot of dependencies in the grammar preprocessor, reducing it to a small functional shell. It is still depending on Compat, but it is most probably possible to reduce the code size even more.
Diffstat (limited to 'plugins/funind')
-rw-r--r--plugins/funind/g_indfun.ml48
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/funind/g_indfun.ml4 b/plugins/funind/g_indfun.ml4
index 61ada5cc8c..e93c395e3d 100644
--- a/plugins/funind/g_indfun.ml4
+++ b/plugins/funind/g_indfun.ml4
@@ -16,8 +16,12 @@ open Constrexpr
open Indfun_common
open Indfun
open Genarg
+open Constrarg
open Tacticals
open Misctypes
+open Pcoq.Prim
+open Pcoq.Constr
+open Pcoq.Tactic
DECLARE PLUGIN "recdef_plugin"
@@ -90,7 +94,7 @@ let out_disjunctive = function
| loc, IntroAction (IntroOrAndPattern l) -> (loc,l)
| _ -> Errors.error "Disjunctive or conjunctive intro pattern expected."
-ARGUMENT EXTEND with_names TYPED AS simple_intropattern_opt PRINTED BY pr_intro_as_pat
+ARGUMENT EXTEND with_names TYPED AS intropattern_opt PRINTED BY pr_intro_as_pat
| [ "as" simple_intropattern(ipat) ] -> [ Some ipat ]
| [] ->[ None ]
END
@@ -149,7 +153,7 @@ let (wit_function_rec_definition_loc : function_rec_definition_loc_argtype Genar
Genarg.create_arg "function_rec_definition_loc"
let function_rec_definition_loc =
- Pcoq.create_generic_entry "function_rec_definition_loc" (Genarg.rawwit wit_function_rec_definition_loc)
+ Pcoq.create_generic_entry Pcoq.utactic "function_rec_definition_loc" (Genarg.rawwit wit_function_rec_definition_loc)
GEXTEND Gram
GLOBAL: function_rec_definition_loc ;