X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcic%2Fdeannotate.ml;h=c560af569e031f54a7e37baec625c950fae7d314;hb=f59b591eb48a06518b34d7f809bee51989307404;hp=ace1e60007b54e9013d57483dffd237e85526327;hpb=68f93b859c6b978bfd66c03fb383985f835f6657;p=helm.git diff --git a/helm/software/components/cic/deannotate.ml b/helm/software/components/cic/deannotate.ml index ace1e6000..c560af569 100644 --- a/helm/software/components/cic/deannotate.ml +++ b/helm/software/components/cic/deannotate.ml @@ -136,7 +136,7 @@ let rec compute_letin_type context te = compute_letin_type ((Some (name,(C.Decl so)))::context) dest) | C.LetIn (name,so,C.Implicit _,dest) -> let so = compute_letin_type context so in - let ty = !type_of_aux' context so in + let ty = Unshare.unshare ~fresh_univs:true (!type_of_aux' context so) in C.LetIn (name, so, ty, compute_letin_type ((Some (name,(C.Def (so,ty))))::context) dest) | C.LetIn (name,so,ty,dest) -> @@ -164,6 +164,10 @@ let rec compute_letin_type context te = compute_letin_type context te, List.map (fun x -> compute_letin_type context x) pl) | C.Fix (fno,fl) -> + let fl = + List.map + (function (name,recno,ty,bo) -> + name,recno,compute_letin_type context ty, bo) fl in let tys,_ = List.fold_left (fun (types,len) (n,_,ty,_) -> @@ -174,11 +178,13 @@ let rec compute_letin_type context te = C.Fix (fno, List.map (fun (name,recno,ty,bo) -> - name, recno, - compute_letin_type context ty, - compute_letin_type (tys @ context) bo + name, recno, ty, compute_letin_type (tys @ context) bo ) fl) | C.CoFix (fno,fl) -> + let fl = + List.map + (function (name,ty,bo) -> + name, compute_letin_type context ty, bo) fl in let tys,_ = List.fold_left (fun (types,len) (n,ty,_) -> @@ -189,9 +195,7 @@ let rec compute_letin_type context te = C.CoFix (fno, List.map (fun (name,ty,bo) -> - name, - compute_letin_type context ty, - compute_letin_type (tys @ context) bo + name, ty, compute_letin_type (tys @ context) bo ) fl) ;;