| C.Lambda _ when skip_lambda -> metasenv, subst, t, expty
| C.Appl _ when skip_appl -> metasenv, subst, t, expty
| _ ->
- pp (lazy (
+ pp (lazy ("forcing infty=expty: "^
(NCicPp.ppterm ~metasenv ~subst ~context infty) ^ " === " ^
(NCicPp.ppterm ~metasenv ~subst:[] ~context expty)));
try
let rec typeof_aux metasenv subst context expty =
fun t as orig ->
(*D*)inside 'R'; try let rc =
- pp (lazy (NCicPp.ppterm ~metasenv ~subst ~context t ^ " expty= " ^
+ pp (lazy (NCicPp.ppterm ~metasenv ~subst ~context t ^ " ::exp:: " ^
match expty with None -> "None" | Some e ->
NCicPp.ppterm ~metasenv ~subst ~context e));
let metasenv, subst, t, infty =
NCicTypeChecker.type_of_branch
~subst context leftno outtype cons ty_cons in
pp (lazy ("TYPEOFBRANCH: " ^
- NCicPp.ppterm ~metasenv ~subst ~context p ^ " ::: " ^
+ NCicPp.ppterm ~metasenv ~subst ~context p ^ " ::inf:: " ^
NCicPp.ppterm ~metasenv ~subst ~context ty_branch ));
let metasenv, subst, p, _ =
typeof_aux metasenv subst context (Some ty_branch) p in
metasenv, subst, C.Match (r, outtype, term, pl),resty
| C.Match _ -> assert false
in
- pp (lazy (NCicPp.ppterm ~metasenv ~subst ~context t ^ " :: "^
+ pp (lazy (NCicPp.ppterm ~metasenv ~subst ~context t ^ " ::inf:: "^
NCicPp.ppterm ~metasenv ~subst ~context infty ));
force_ty true true metasenv subst context orig t infty expty
(*D*)in outside(); rc with exc -> outside (); raise exc
" of type " ^ NCicPp.ppterm ~metasenv ~subst ~context ty_he
^ " to type " ^ match expty with None -> "None" | Some x ->
NCicPp.ppterm ~metasenv ~subst ~context x));
- force_ty true false metasenv subst context orig_t res ty_he expty
+ (* whatever the term is, we force the type. in case of ((Lambda..) ?...)
+ * the application may also be a lambda! *)
+ force_ty false false metasenv subst context orig_t res ty_he expty
| NCic.Implicit `Vector::tl ->
let has_some_more_pis x =
match NCicReduction.whd ~subst context x with