(* exceptions *)
exception Pacman
exception Bottom
+exception Lambda
exception Backtrack of string
(*
let freshno,new_t,acc_new_ps =
try
expand_match (freshno,ps,acc_new_ps) t
- with Pacman -> freshno,convergent_dummy,acc_new_ps
+ with Pacman | Lambda -> freshno,convergent_dummy,acc_new_ps
| Bottom -> raise (Backtrack "Bottom in conv") in
aux_conv ps (freshno,acc_conv@[new_t],acc_new_ps) todo_conv
let t = mk_match (`N i) orig bs_lift bs (args :> nf list) in
(*prerr_endline ("NUOVO t:" ^ print (fst t :> nf) ^ " more_args=" ^ string_of_int (snd t));*)
expand_match (freshno,acc_ps,acc_new_ps) t
- | `Lam _ -> assert false (* algorithm invariant/loose typing *)
+ | `Lam _ -> raise Lambda (* assert false (* algorithm invariant/loose typing *) *)
| `Bottom -> raise Bottom
| `Pacman -> raise Pacman
| #i_n_var as x ->