From c1cab3ba606f7034f2785f06c0d3892bca3976cf Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 18 Aug 2017 11:36:05 +0200 Subject: Removing cumbersome location in multiple patterns. This is to have a better symmetry between CCases and GCases. --- API/API.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'API') diff --git a/API/API.mli b/API/API.mli index abbdf22b91..99ba3eea47 100644 --- a/API/API.mli +++ b/API/API.mli @@ -2388,7 +2388,7 @@ sig and case_expr = constr_expr * Names.Name.t Loc.located option * cases_pattern_expr option and branch_expr = - (cases_pattern_expr list Loc.located list * constr_expr) Loc.located + (cases_pattern_expr list list * constr_expr) Loc.located and binder_expr = Names.Name.t Loc.located list * binder_kind * constr_expr -- cgit v1.2.3 From 5c9d569cee804c099c44286777ab084e0370399f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Tue, 15 Aug 2017 14:51:08 +0200 Subject: In printing, factorizing "match" clauses with same right-hand side. Moreover, when there are at least two clauses and the last most factorizable one is a disjunction with no variables, turn it into a catch-all clause. Adding options Unset Printing Allow Default Clause. to deactivate the second behavior, and Unset Printing Factorizable Match Patterns. to deactivate the first behavior (deactivating the first one deactivates also the second one). E.g. printing match x with Eq => 1 | _ => 0 end gives match x with | Eq => 1 | _ => 0 end or (with default clause deactivates): match x with | Eq => 1 | Lt | Gt => 0 end More to be done, e.g. reconstructing multiple patterns in Nat.eqb... --- API/API.mli | 1 + 1 file changed, 1 insertion(+) (limited to 'API') diff --git a/API/API.mli b/API/API.mli index 99ba3eea47..089cf8b15e 100644 --- a/API/API.mli +++ b/API/API.mli @@ -4339,6 +4339,7 @@ sig | Later : [ `thunk ] delay val print_universes : bool ref val print_evar_arguments : bool ref + val print_allow_match_default_clause : bool ref val detype : 'a delay -> ?lax:bool -> bool -> Names.Id.Set.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> 'a Glob_term.glob_constr_g val subst_glob_constr : Mod_subst.substitution -> Glob_term.glob_constr -> Glob_term.glob_constr val set_detype_anonymous : (?loc:Loc.t -> int -> Names.Id.t) -> unit -- cgit v1.2.3