let (_,ty,_) = List.nth fl i in
ty
+ (* CSC: wrong name and position: decast really does Cast-LetIn reduction *)
and decast =
let module C = Cic in
function
- C.Cast (t,_) -> t
+ C.Cast (t,_) -> decast t
+ | C.LetIn (_,s,t) -> decast (CicSubstitution.subst s t)
| t -> t
and sort_of_prod (t1, t2) =
when (s2 = C.Prop or s2 = C.Set) -> (* different from Coq manual!!! *)
C.Sort s2
| (C.Sort s1, C.Sort s2) -> C.Sort C.Type (*CSC manca la gestione degli universi!!! *)
- | (_,_) -> raise (NotWellTyped "Prod")
+ | (_,_) ->
+ raise
+ (NotWellTyped ("Prod: sort1= " ^ CicPp.ppterm t1 ^ " ;
+ sort2= " ^ CicPp.ppterm t2))
and eat_prods hetype =
(*CSC: siamo sicuri che le are_convertible non lavorino con termini non *)