| C.Prod (n,s,t) ->
Hashtbl.add ids_to_inner_sorts fresh_id''
(string_of_sort innertype) ;
- C.AProd (fresh_id'', n, aux' bs s, aux' ((n,s)::bs) t)
+ C.AProd (fresh_id'', n, aux' bs s, aux' ((n, C.Decl s)::bs) t)
| C.Lambda (n,s,t) ->
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
if innersort = "Prop" then
if not father_is_lambda then
add_inner_type fresh_id''
end ;
- C.ALambda (fresh_id'',n, aux' bs s, aux' ((n,s)::bs) t)
+ C.ALambda (fresh_id'',n, aux' bs s, aux' ((n, C.Decl s)::bs) t)
| C.LetIn (n,s,t) ->
-(*CSC: Nell'environment debbo poter avere anche dichiarazioni! ;-(
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
- C.ALetIn (fresh_id'', n, aux' bs s, aux' (n::bs) t)
-*) assert false
+ C.ALetIn (fresh_id'', n, aux' bs s, aux' ((n, C.Def s)::bs) t)
| C.Appl l ->
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
if innersort = "Prop" then
C.AMutCase (fresh_id'', uri, cn, tyno, aux' bs outty,
aux' bs term, List.map (aux' bs) patterns)
| C.Fix (funno, funs) ->
- let names = List.map (fun (name,_,ty,_) -> C.Name name,ty) funs in
+ let names =
+ List.map (fun (name,_,ty,_) -> C.Name name, C.Decl ty) funs
+ in
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
if innersort = "Prop" then
add_inner_type fresh_id'' ;
) funs
)
| C.CoFix (funno, funs) ->
- let names = List.map (fun (name,ty,_) -> C.Name name,ty) funs in
+ let names =
+ List.map (fun (name,ty,_) -> C.Name name, C.Decl ty) funs in
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
if innersort = "Prop" then
add_inner_type fresh_id'' ;
ids_to_terms, ids_to_father_ids, ids_to_inner_sorts, ids_to_inner_types
;;
-exception Found of (Cic.name * Cic.term) list;;
+exception Found of (Cic.name * Cic.context_entry) list;;
(* get_context_of_meta meta term *)
(* returns the context of the occurrence of [meta] in [term]. *)
| C.Sort _
| C.Implicit -> ()
| C.Cast (te,ty) -> aux ctx te ; aux ctx ty
- | C.Prod (n,s,t) -> aux ctx s ; aux (((*P.Declaration,*)n,s)::ctx) t
- | C.Lambda (n,s,t) -> aux ctx s ; aux (((*P.Declaration,*)n,s)::ctx) t
- | C.LetIn (n,s,t) ->
- aux ctx s ; assert false (* aux ([P.Definition,n,s]::ctx) t *)
+ | C.Prod (n,s,t) -> aux ctx s ; aux ((n, C.Decl s)::ctx) t
+ | C.Lambda (n,s,t) -> aux ctx s ; aux ((n, C.Decl s)::ctx) t
+ | C.LetIn (n,s,t) -> aux ctx s ; aux ((n, C.Def s)::ctx) t
| C.Appl l -> List.iter (aux ctx) l
| C.Const _ -> ()
| C.Abst _ -> assert false
let ctx' =
List.rev_map
(function (name,_,ty,bo) ->
- let res = ((*P.Definition,*) C.Name name, C.Fix (!counter,ifl)) in
+ let res = (C.Name name, C.Def (C.Fix (!counter,ifl))) in
incr counter ;
res
) ifl
let ctx' =
List.rev_map
(function (name,ty,bo) ->
- let res = ((*P.Definition,*) C.Name name, C.CoFix (!counter,ifl)) in
+ let res = (C.Name name, C.Def (C.CoFix (!counter,ifl))) in
incr counter ;
res
) ifl