exception Uncertain of string;;
exception AssertFailure of string;;
-let debug_print = prerr_endline
+let debug_print = fun _ -> ()
let fo_unif_subst subst context metasenv t1 t2 ugraph =
try
;;
let look_for_coercion src tgt =
+ None
+ (*
if (src = (CicUtil.term_of_uri "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)")) &&
(tgt = (CicUtil.term_of_uri "cic:/Coq/Reals/Rdefinitions/R.con"))
then
begin
- prerr_endline "TROVATA coercion";
+ debug_print "TROVATA coercion";
Some (CicUtil.term_of_uri "cic:/Coq/Reals/Raxioms/INR.con")
end
else
begin
- prerr_endline (sprintf "NON TROVATA la coercion %s %s" (CicPp.ppterm src)
+ debug_print (sprintf "NON TROVATA la coercion %s %s" (CicPp.ppterm src)
(CicPp.ppterm tgt));
None
end
+ *)
;;
try
fo_unif_subst subst context metasenv hetype hetype' ugraph
with exn ->
- prerr_endline (Printf.sprintf "hetype=%s\nhetype'=%s\nmetasenv=%s\nsubst=%s"
+ debug_print (Printf.sprintf "hetype=%s\nhetype'=%s\nmetasenv=%s\nsubst=%s"
(CicPp.ppterm hetype)
(CicPp.ppterm hetype')
(CicMetaSubst.ppmetasenv metasenv [])
(cleaned_t,cleaned_ty,cleaned_metasenv,ugraph1)
;;
+let type_of_aux' metasenv context term ugraph =
+ try
+ type_of_aux' metasenv context term ugraph
+ with
+ CicUniv.UniverseInconsistency msg -> raise (RefineFailure msg)
+
+
(* DEBUGGING ONLY
let type_of_aux' metasenv context term =
try