X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_omdoc%2Fcic2acic.ml;h=f86e22f842d7ee23392357d639e4284f384c0ae3;hb=3bb4ce11fb9d4c6375483a80344beb94c4517dd7;hp=bf686ac4e6e1781cf505d6e8330cf86dd3542cf9;hpb=4adceafdaa4cd82c427ac9de494179c242e7ad28;p=helm.git diff --git a/helm/ocaml/cic_omdoc/cic2acic.ml b/helm/ocaml/cic_omdoc/cic2acic.ml index bf686ac4e..f86e22f84 100644 --- a/helm/ocaml/cic_omdoc/cic2acic.ml +++ b/helm/ocaml/cic_omdoc/cic2acic.ml @@ -108,12 +108,14 @@ 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 -> "Type" + | C.Sort (C.Type _) -> "Type" (* TASSI OK*) | C.Sort C.CProp -> "CProp" | C.Meta _ -> prerr_endline "Cic2acic: string_of_sort applied to a meta" ; "?" - | _ -> assert false + | t -> +prerr_endline ("Cic2acic: string_of_sort applied to: " ^ CicPp.ppterm t) ; + assert false in let ainnertypes,innertype,innersort,expected_available = (*CSC: Here we need the algorithm for Coscoy's double type-inference *) @@ -134,7 +136,7 @@ prerr_endline "Cic2acic: string_of_sort applied to a meta" ; {D.synthesized = (***CSC: patch per provare i tempi CicReduction.whd context (xxx_type_of_aux' metasenv context tt) ; *) -Cic.Sort Cic.Type ; +Cic.Sort (Cic.Type (CicUniv.fresh())); (* TASSI: non dovrebbe fare danni *) D.expected = None} in incr number_new_type_of_aux' ; @@ -162,7 +164,8 @@ Cic.Sort Cic.Type ; 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,"Type",false + None,Cic.Sort (Cic.Type (CicUniv.fresh())),"Type",false + (* TASSI non dovrebbe fare danni *) (* *) in let add_inner_type id = @@ -191,9 +194,7 @@ Cic.Sort Cic.Type ; in C.AVar (fresh_id'', uri,exp_named_subst') | C.Meta (n,l) -> - let (_,canonical_context,_) = - List.find (function (m,_,_) -> n = m) metasenv - in + let (_,canonical_context,_) = CicUtil.lookup_meta n metasenv in xxx_add ids_to_inner_sorts fresh_id'' innersort ; if innersort = "Prop" && expected_available then add_inner_type fresh_id'' ;