let typecheck_obj =
let profiler = HExtlib.profile "add_obj.typecheck_obj" in
- fun uri obj -> profiler.HExtlib.profile (CicTypeChecker.typecheck_obj uri)
- (Unshare.fresh_types obj)
+ fun uri obj -> profiler.HExtlib.profile (CicTypeChecker.typecheck_obj uri) obj
let index_obj =
let profiler = HExtlib.profile "add_obj.index_obj" in
(Printf.sprintf "QED: %%univ = %2.5f, total = %2.5f, univ = %2.5f, %s\n"
(univ_time *. 100. /. total_time) (total_time) (univ_time)
(UriManager.name_of_uri uri));*)
- let _, ugraph, univlist =
- CicEnvironment.get_cooked_obj_with_univlist CicUniv.empty_ugraph uri in
+ let obj, ugraph, univlist =
+ try CicEnvironment.get_cooked_obj_with_univlist CicUniv.empty_ugraph uri
+ with CicEnvironment.Object_not_found _ -> assert false
+ in
try
index_obj ~dbd ~uri; (* 2 must be in the env *)
try
List.iter remove_single_obj !uris;
raise exn
in
- let (obj, univ) = (CicEnvironment.get_obj CicUniv.empty_ugraph uri) in
+ let obj, _ = (CicEnvironment.get_obj CicUniv.oblivion_ugraph uri) in
match obj with
| Cic.InductiveDefinition (indTypes, _, _, _) ->
let counter = ref 0 in
=
let coer_ty,_ =
let coer = CicUtil.term_of_uri uri in
- CicTypeChecker.type_of_aux' [] [] coer CicUniv.empty_ugraph
+ CicTypeChecker.type_of_aux' [] [] coer CicUniv.oblivion_ugraph
in
(* we have to get the source and the tgt type uri
* in Coq syntax we have already their names, but
(fun (uri, name, bo) (_name, coercion, arity) ->
let saturations = 0 in
try
- let ty, ugraph =
- CicTypeChecker.type_of_aux' [] [] bo CicUniv.empty_ugraph in
+ let ty, _ =
+ CicTypeChecker.type_of_aux' [] [] bo CicUniv.oblivion_ugraph in
let attrs = [`Class `Projection; `Generated] in
let obj = Cic.Constant (name,Some bo,ty,[],attrs) in
add_single_obj uri obj refinement_toolkit;