X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fcic_proof_checking%2FfreshNamesGenerator.ml;h=73b75ce18e7257e876a0d316d934fd95db15350d;hb=45d665041eae44ef5527e2c5a65329493d742ef3;hp=3cfda02dff123a649bf51005ed6a0c01647c275d;hpb=c17c9e41a88339260e15a5206878f85558666fbb;p=helm.git diff --git a/components/cic_proof_checking/freshNamesGenerator.ml b/components/cic_proof_checking/freshNamesGenerator.ml index 3cfda02df..73b75ce18 100755 --- a/components/cic_proof_checking/freshNamesGenerator.ml +++ b/components/cic_proof_checking/freshNamesGenerator.ml @@ -193,9 +193,13 @@ let rec mk_fresh_names ~subst metasenv context t = let pl' = List.map (mk_fresh_names ~subst metasenv context) pl in Cic.MutCase (sp, i, outty', t', pl') | Cic.Fix (i, fl) -> - let tys = List.map - (fun (n,_,ty,_) -> - Some (Cic.Name n,(Cic.Decl ty))) fl in + let tys,_ = + List.fold_left + (fun (types,len) (n,_,ty,_) -> + (Some (Cic.Name n,(Cic.Decl (CicSubstitution.lift len ty)))::types, + len+1) + ) ([],0) fl + in let fl' = List.map (fun (n,i,ty,bo) -> let ty' = mk_fresh_names ~subst metasenv context ty in @@ -203,9 +207,13 @@ let rec mk_fresh_names ~subst metasenv context t = (n,i,ty',bo')) fl in Cic.Fix (i, fl') | Cic.CoFix (i, fl) -> - let tys = List.map - (fun (n,_,ty) -> - Some (Cic.Name n,(Cic.Decl ty))) fl in + let tys,_ = + List.fold_left + (fun (types,len) (n,ty,_) -> + (Some (Cic.Name n,(Cic.Decl (CicSubstitution.lift len ty)))::types, + len+1) + ) ([],0) fl + in let fl' = List.map (fun (n,ty,bo) -> let ty' = mk_fresh_names ~subst metasenv context ty in