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 *)
{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' ;
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 =
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'' ;