let ignore_exc = false
let rank_all_dependencies = false
let trust_environment = false
-let print_object = false
+let print_object = true
let indent = ref 0;;
roots_alluris;
prerr_endline "finished....";
let lll, uuu =(CicUniv.do_rank (get_graph ())) in
+ CicUniv.print_ugraph (get_graph ());
let lll = List.sort compare lll in
List.iter (fun k ->
prerr_endline (CicUniv.string_of_universe k ^ " = " ^ string_of_int (CicUniv.get_rank k))) uuu;
try
NCicTypeChecker.typecheck_obj o
with
- | NCicTypeChecker.AssertFailure s
- | NCicTypeChecker.TypeCheckerFailure s
- | NCicEnvironment.ObjectNotFound s
- | NCicEnvironment.BadConstraint s
- | NCicEnvironment.BadDependency s as e ->
- prerr_endline ("######### " ^ Lazy.force s);
- if not ignore_exc then raise e
+ exn ->
+ let rec aux = function
+ | NCicTypeChecker.AssertFailure s
+ | NCicTypeChecker.TypeCheckerFailure s
+ | NCicEnvironment.ObjectNotFound s
+ | NCicEnvironment.BadConstraint s as e->
+ prerr_endline ("######### " ^ Lazy.force s);
+ if not ignore_exc then raise e
+ | NCicEnvironment.BadDependency (s,x) as e ->
+ prerr_endline ("######### " ^ Lazy.force s);
+ aux x;
+ if not ignore_exc then raise e
+ | e -> raise e
+ in
+ aux exn
)
alluris;
NCicEnvironment.invalidate ();
exception CircularDependency of string Lazy.t;;
exception ObjectNotFound of string Lazy.t;;
-exception BadDependency of string Lazy.t;;
+exception BadDependency of string Lazy.t * exn;;
exception BadConstraint of string Lazy.t;;
let type0 = []
Sys.Break as e ->
frozen_list := saved_frozen_list;
raise e
- | Propagate (u',_) as e' ->
+ | Propagate (u',old_exn) as e' ->
frozen_list := saved_frozen_list;
let exn = `Exn (BadDependency (lazy (NUri.string_of_uri u ^
" depends (recursively) on " ^ NUri.string_of_uri u' ^
- " which is not well-typed"))) in
+ " which is not well-typed"),
+ match old_exn with BadDependency (_,e) -> e | _ -> old_exn)) in
NUri.UriHash.add cache u exn;
if saved_frozen_list = [] then
exn
exception CircularDependency of string Lazy.t;;
exception ObjectNotFound of string Lazy.t;;
-exception BadDependency of string Lazy.t;;
+exception BadDependency of string Lazy.t * exn;;
exception BadConstraint of string Lazy.t;;
val get_checked_obj: NUri.uri -> NCic.obj