From 181e9162b40e9ad0bd6afb28d277e36e8912b2e7 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 2 Feb 2020 21:36:14 +0100 Subject: Fixing some residual bugs of PR #10202 (manual implicit args in subterms). - Implicit arguments in the return clause and in the branches of a match were not checked. - Implicit arguments in each declaration of intern_context were not restarted. - Additionally, in intern_context, we take into account ids from the env on top of which intern_context is called. - A better approximation of the check for manual implicit in notations improved (though not fully correct because the exact context of interpretation of a binder in a notation with recursive binders is not known). We also rename impl_binder_index into binder_block_names in anticipation of checking redundancies also for non-implicit arguments. --- interp/notation_ops.mli | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'interp/notation_ops.mli') diff --git a/interp/notation_ops.mli b/interp/notation_ops.mli index f9de6b7d6b..c62dac013b 100644 --- a/interp/notation_ops.mli +++ b/interp/notation_ops.mli @@ -35,12 +35,21 @@ val notation_constr_of_glob_constr : notation_interp_env -> (** Re-interpret a notation as a [glob_constr], taking care of binders *) +type 'a binder_status_fun = { + no : 'a -> 'a; + restart_prod : 'a -> 'a; + restart_lambda : 'a -> 'a; + switch_prod : 'a -> 'a; + switch_lambda : 'a -> 'a; + slide : 'a -> 'a; +} + val apply_cases_pattern : ?loc:Loc.t -> (Id.t list * cases_pattern_disjunction) * Id.t -> glob_constr -> glob_constr val glob_constr_of_notation_constr_with_binders : ?loc:Loc.t -> ('a -> Name.t -> 'a * ((Id.t list * cases_pattern_disjunction) * Id.t) option * Name.t) -> - ('a -> notation_constr -> glob_constr) -> + ('a -> notation_constr -> glob_constr) -> ?h:'a binder_status_fun -> 'a -> notation_constr -> glob_constr val glob_constr_of_notation_constr : ?loc:Loc.t -> notation_constr -> glob_constr -- cgit v1.2.3