| `N n -> string_of_int n
| `I _ as t -> "(" ^ string_of_term_no_pars_app l (t :> nf) ^ ")"
| `Lam _ as t -> "(" ^ string_of_term_no_pars_lam l t ^ ")"
- | `Match(t,_,bs_lift,bs,args) ->
- "(match " ^ string_of_term_no_pars l (t :> nf) ^
+ | `Match(t,(v,ar),bs_lift,bs,args) ->
+ "[match("^print_name l v ^ ":" ^ string_of_int ar^") " ^ string_of_term_no_pars l (t :> nf) ^
" with " ^ String.concat " | " (List.map (fun (n,t) -> string_of_int n ^ " => " ^ string_of_term l (lift bs_lift t)) !bs) ^ "] " ^
String.concat " " (List.map (string_of_term l) args) ^ ")"
and string_of_term_no_pars_app l = function
let aux_propagate_arity ar = function
| `Lam(false,`Match(`I(v,args),(x,_),liftno,bs,args')) when not delift_by_one ->
`Lam(false,`Match(`I(v,args),(x,ar),liftno,bs,args'))
- | `Var(i,oldar) -> `Var(i, if truelam && oldar = min_int then ar else oldar)
+ | `Var(i,oldar) -> `Var(i, if truelam then (assert (oldar = min_int); ar) else oldar)
| _ as t -> t in
let rec aux_i_num_var l =
function