if R.are_convertible status ~metasenv ~subst context ty_arg s then
aux (S.subst status ~avoid_beta_redexes:true arg t) tl
else
+ let indent s = " " ^ (Str.global_replace (Str.regexp "\n") "\n " s) in
raise
(TypeCheckerFailure
(lazy (Printf.sprintf
- ("Appl: wrong application of %s: the argument %s has type"^^
+ ("Appl: wrong application of\n%s\nThe argument\n%s\nhas type"^^
"\n%s\nbut it should have type \n%s\nContext:\n%s\n")
- (status#ppterm ~subst ~metasenv ~context he)
- (status#ppterm ~subst ~metasenv ~context arg)
- (status#ppterm ~subst ~metasenv ~context ty_arg)
- (status#ppterm ~subst ~metasenv ~context s)
+ (indent (status#ppterm ~subst ~metasenv ~context he))
+ (indent (status#ppterm ~subst ~metasenv ~context arg))
+ (indent (status#ppterm ~subst ~metasenv ~context ty_arg))
+ (indent (status#ppterm ~subst ~metasenv ~context s))
(status#ppcontext ~subst ~metasenv context))))
| _ ->
raise
NCicUtils.Meta_not_found _ ->
(* Fake metavariable used in NTacStatus and NCicRefiner :-( *)
assert (n = -1); res
+ | NCicTypeChecker.TypeCheckerFailure msg ->
+ HLog.error "----------- Problem with Dependent Types ----------";
+ HLog.error (Lazy.force msg) ;
+ HLog.error "---------------------------------------------------";
+ raise (NotFound `NotWellTyped)
| TypeNotGood
| NCicTypeChecker.AssertFailure _
| NCicReduction.AssertFailure _
inherit Interpretations.status
inherit TermContentPres.status
method ppterm ~context ~subst ~metasenv ?margin ?inside_fix t =
- snd (ntxt_of_cic_term ~map_unicode_to_tex:true 80 self ~metasenv ~subst
+ snd (ntxt_of_cic_term ~map_unicode_to_tex:false 80 self ~metasenv ~subst
~context t)
method ppcontext ?sep ~subst ~metasenv context =
- snd (ntxt_of_cic_context ~map_unicode_to_tex:true 80 self ~metasenv ~subst
+ snd (ntxt_of_cic_context ~map_unicode_to_tex:false 80 self ~metasenv ~subst
context)
method ppsubst ~metasenv ?use_subst subst =
- snd (ntxt_of_cic_subst ~map_unicode_to_tex:true 80 self ~metasenv ?use_subst
+ snd (ntxt_of_cic_subst ~map_unicode_to_tex:false 80 self ~metasenv ?use_subst
subst)
method ppmetasenv ~subst metasenv =
String.concat "\n"
(List.map
- (fun m -> snd (ntxt_of_cic_sequent ~map_unicode_to_tex:true 80 self
+ (fun m -> snd (ntxt_of_cic_sequent ~map_unicode_to_tex:false 80 self
~metasenv ~subst m)) metasenv)
method ppobj obj =
- snd (ntxt_of_cic_object ~map_unicode_to_tex:true 80 self obj)
+ snd (ntxt_of_cic_object ~map_unicode_to_tex:false 80 self obj)
end