From 52b93b587b9cb53b0ed11c7d6cf5f328d7ee1479 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 23 Oct 2020 22:58:30 +0200 Subject: Add preliminary support for notations with large class (non-recursive) binders. We introduce a class of open binders which includes "x", "x:t", "'pat" and a class of closed binders which includes "x", "(x:t)", "'pat". --- interp/constrexpr.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'interp/constrexpr.ml') diff --git a/interp/constrexpr.ml b/interp/constrexpr.ml index 977cbbccf2..a5ff5df7cf 100644 --- a/interp/constrexpr.ml +++ b/interp/constrexpr.ml @@ -83,6 +83,8 @@ type cases_pattern_expr_r = | CPatCast of cases_pattern_expr * constr_expr and cases_pattern_expr = cases_pattern_expr_r CAst.t +and kinded_cases_pattern_expr = cases_pattern_expr * Glob_term.binding_kind + and cases_pattern_notation_substitution = cases_pattern_expr list * (* for constr subterms *) cases_pattern_expr list list (* for recursive notations *) @@ -150,7 +152,7 @@ and local_binder_expr = and constr_notation_substitution = constr_expr list * (* for constr subterms *) constr_expr list list * (* for recursive notations *) - cases_pattern_expr list * (* for binders *) + kinded_cases_pattern_expr list * (* for binders *) local_binder_expr list list (* for binder lists (recursive notations) *) type constr_pattern_expr = constr_expr -- cgit v1.2.3 From 23924afa0e4d7ed9ca58fbf5f69dc57685d593fa Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sat, 24 Oct 2020 13:18:09 +0200 Subject: A step towards supporting pattern cast deeplier. We at least support a cast at the top of patterns in notations. --- interp/constrexpr.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'interp/constrexpr.ml') diff --git a/interp/constrexpr.ml b/interp/constrexpr.ml index a5ff5df7cf..b3f06faa1c 100644 --- a/interp/constrexpr.ml +++ b/interp/constrexpr.ml @@ -147,7 +147,7 @@ and recursion_order_expr = recursion_order_expr_r CAst.t and local_binder_expr = | CLocalAssum of lname list * binder_kind * constr_expr | CLocalDef of lname * constr_expr * constr_expr option - | CLocalPattern of (cases_pattern_expr * constr_expr option) CAst.t + | CLocalPattern of cases_pattern_expr and constr_notation_substitution = constr_expr list * (* for constr subterms *) -- cgit v1.2.3