X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Fnum.ml;h=d00398532ae4495d6379a2fca1cc3e7f1adbf002;hb=5c065c453e7d3f1e35d9f23fb4b6345d88d0f083;hp=d59d07f49f529f40eb39160acd2d5c313427c8cf;hpb=6895644003c1c199f1a43d300b04a975959024e8;p=fireball-separation.git diff --git a/ocaml/num.ml b/ocaml/num.ml index d59d07f..d003985 100644 --- a/ocaml/num.ml +++ b/ocaml/num.ml @@ -114,8 +114,8 @@ let rec string_of_term l = | `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 @@ -200,7 +200,7 @@ and subst truelam delift_by_one what (with_what : nf) (where : nf) = 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,_) -> `Var(i,ar) + | `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