X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_omdoc%2Fcic2acic.ml;h=0d3127c3176be7c7d2b514895f28257ac927b689;hb=28ac70d3f475442cda4ef30e0e9c0e6d012b2527;hp=69c91cdb3eb959d07fa1e8592ddf80adc518de02;hpb=c8a5bd44cf3de45e2736d45bfb8b9b23835b309b;p=helm.git diff --git a/helm/ocaml/cic_omdoc/cic2acic.ml b/helm/ocaml/cic_omdoc/cic2acic.ml index 69c91cdb3..0d3127c31 100644 --- a/helm/ocaml/cic_omdoc/cic2acic.ml +++ b/helm/ocaml/cic_omdoc/cic2acic.ml @@ -23,25 +23,18 @@ * http://cs.unibo.it/helm/. *) -type sort_kind = [ `Prop | `Set | `Type | `CProp ] - -let sort_of_string = function - | "Prop" -> `Prop - | "Set" -> `Set - | "Type" -> `Type - | "CProp" -> `CProp - | _ -> assert false +type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp ] let string_of_sort = function | `Prop -> "Prop" | `Set -> "Set" - | `Type -> "Type" + | `Type u -> "Type:" ^ string_of_int (CicUniv.univno u) | `CProp -> "CProp" let sort_of_sort = function | Cic.Prop -> `Prop | Cic.Set -> `Set - | Cic.Type _ -> `Type + | Cic.Type u -> `Type u | Cic.CProp -> `CProp (* let hashtbl_add_time = ref 0.0;; *) @@ -134,8 +127,8 @@ let acic_of_cic_context' seed ids_to_terms ids_to_father_ids ids_to_inner_sorts match CicReduction.whd context t with C.Sort C.Prop -> `Prop | C.Sort C.Set -> `Set - | C.Sort (C.Type _) - | C.Meta _ -> `Type + | C.Sort (C.Type u) -> `Type u + | C.Meta _ -> `Type (CicUniv.fresh()) | C.Sort C.CProp -> `CProp | t -> prerr_endline ("Cic2acic.sort_of applied to: " ^ CicPp.ppterm t) ; @@ -188,7 +181,8 @@ Cic.Sort (Cic.Type (CicUniv.fresh())); (* TASSI: non dovrebbe fare danni *) with Not_found -> (* l'inner-type non e' nella tabella ==> sort <> Prop *) (* CSC: Type or Set? I can not tell *) - None,Cic.Sort (Cic.Type (CicUniv.fresh())),`Type,false + let u = CicUniv.fresh() in + None,Cic.Sort (Cic.Type u),`Type u,false (* TASSI non dovrebbe fare danni *) (* *) in