]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/proceduralHelpers.ml
Never commit before trying to compile... stupid typo fixed.
[helm.git] / helm / software / components / acic_procedural / proceduralHelpers.ml
index fb95a6d0c4cf4e842831398e5f7186ac99ae77ac..d599bdeb2b8420c11ce83573535d11603e3e2b38 100644 (file)
@@ -81,7 +81,7 @@ let compose f g x = f (g x)
 let fst3 (x, _, _) = x
 
 let refine c t =
-   try let t, _, _, _ = Rf.type_of_aux' [] c t Un.empty_ugraph in t
+   try let t, _, _, _ = Rf.type_of_aux' [] c t Un.oblivion_ugraph in t
    with e -> 
       Printf.eprintf "REFINE EROR: %s\n" (Printexc.to_string e);
       Printf.eprintf "Ref: context: %s\n" (Pp.ppcontext c);
@@ -89,7 +89,7 @@ let refine c t =
       raise e
 
 let get_type c t =
-   try let ty, _ = TC.type_of_aux' [] c t Un.empty_ugraph in ty
+   try let ty, _ = TC.type_of_aux' [] c t Un.oblivion_ugraph in ty
    with e -> 
       Printf.eprintf "TC: context: %s\n" (Pp.ppcontext c);
       Printf.eprintf "TC: term   : %s\n" (Pp.ppterm t);
@@ -124,7 +124,7 @@ let is_not_atomic = function
 let is_atomic t = not (is_not_atomic t)
 
 let get_ind_type uri tyno =
-   match E.get_obj Un.empty_ugraph uri with
+   match E.get_obj Un.oblivion_ugraph uri with
       | C.InductiveDefinition (tys, _, lpsno, _), _ -> lpsno, List.nth tys tyno
       | _                                           -> assert false
 
@@ -180,11 +180,11 @@ let cic_bc c t =
    let get_fix_decl (sname, i, w, v) = sname, w in
    let get_cofix_decl (sname, w, v) = sname, w in
    let rec bc c = function
-      | C.LetIn (name, v, t) ->
+      | C.LetIn (name, v, ty, t) ->
          let name = mk_fresh_name c name in
-         let entry = Some (name, C.Def (v, None)) in
-         let v, t = bc c v, bc (entry :: c) t in
-        C.LetIn (name, v, t)
+         let entry = Some (name, C.Def (v, ty)) in
+         let v, ty, t = bc c v, bc c ty, bc (entry :: c) t in
+        C.LetIn (name, v, ty, t)
       | C.Lambda (name, w, t) ->
          let name = mk_fresh_name c name in
          let entry = Some (name, C.Decl w) in
@@ -222,11 +222,11 @@ let acic_bc c t =
    let get_fix_decl (id, sname, i, w, v) = sname, cic w in
    let get_cofix_decl (id, sname, w, v) = sname, cic w in
    let rec bc c = function
-      | C.ALetIn (id, name, v, t) ->
+      | C.ALetIn (id, name, v, ty, t) ->
          let name = mk_fresh_name c name in
-         let entry = Some (name, C.Def (cic v, None)) in
-         let v, t = bc c v, bc (entry :: c) t in
-        C.ALetIn (id, name, v, t)
+         let entry = Some (name, C.Def (cic v, cic ty)) in
+         let v, ty, t = bc c v, bc c ty, bc (entry :: c) t in
+        C.ALetIn (id, name, v, ty, t)
       | C.ALambda (id, name, w, t) ->
          let name = mk_fresh_name c name in
          let entry = Some (name, C.Decl (cic w)) in