]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_transformations/acic2Ast.ml
coercion application
[helm.git] / helm / ocaml / cic_transformations / acic2Ast.ml
index 24d2e07f3dc35db110bfd7dd6a2298a2d3a08ac9..752dd321642243763245dddaba808c47385fd4b7 100644 (file)
@@ -37,11 +37,12 @@ let sort_of_string = function
   | _ -> assert false
 
 let get_types uri =
-  match CicEnvironment.get_obj uri with
-  | Cic.Constant _ -> assert false
-  | Cic.Variable _ -> assert false
-  | Cic.CurrentProof _ -> assert false
-  | Cic.InductiveDefinition (l,_,_) -> l 
+  let o,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in
+    match o with
+      | Cic.Constant _ -> assert false
+      | Cic.Variable _ -> assert false
+      | Cic.CurrentProof _ -> assert false
+      | Cic.InductiveDefinition (l,_,_) -> l 
 
 let name_of_inductive_type uri i = 
   let types = get_types uri in
@@ -72,7 +73,6 @@ let ast_of_acic ids_to_inner_sorts acic =
   in
   let idref id t = Ast.AttributedTerm (`IdRef id, t) in
   let rec aux =
-prerr_endline "Acic2ast.aux";
     function
     | Cic.ARel (id,_,_,b) -> idref id (Ast.Ident (b, None))
     | Cic.AVar (id,uri,subst) ->
@@ -215,9 +215,7 @@ prerr_endline "Acic2ast.aux";
       context
 
   in
-  let res = aux acic, ids_to_uris in
-prerr_endline "/Acic2ast.aux";
-  res
+  aux acic, ids_to_uris
 
 let _ = (** fill symbol_table *)
   let add_symbol name uri =