let c_s = carr s subst context in
CoercGraph.look_for_coercion c_hety c_s, c_s
in
- match coer with
+ (match coer with
| CoercGraph.NoCoercion
| CoercGraph.NotHandled _ ->
enrich localization_tbl hete
subst metasenv ugraph
(Cic.Appl[c;hete]) tgt_carr
in
- newt, subst, metasenv, ugraph
+ newt, subst, metasenv, ugraph)
+ | exn ->
+ enrich localization_tbl hete
+ ~f:(fun _ ->
+ (lazy ("The term " ^
+ CicMetaSubst.ppterm_in_context subst hete
+ context ^ " has type " ^
+ CicMetaSubst.ppterm_in_context subst hety
+ context ^ " but is here used with type " ^
+ CicMetaSubst.ppterm_in_context subst s context
+ (* "\nReason: " ^ Lazy.force e*)))) exn
in
let coerced_args,metasenv',subst',t',ugraph2 =
eat_prods metasenv subst context