X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fcic_exportation%2FcicExportation.ml;h=58e8170911ba0d05a3f470622a3b6b5ecfe59ba4;hb=0de121df33dac75fa7e5055b3a45e2b2fbeab1b1;hp=8af058f9692d3bb8590fac15264d8236893c859b;hpb=26ddd41957341a1e140440b626baf0e4fbcf2adb;p=helm.git diff --git a/components/cic_exportation/cicExportation.ml b/components/cic_exportation/cicExportation.ml index 8af058f96..58e817091 100644 --- a/components/cic_exportation/cicExportation.ml +++ b/components/cic_exportation/cicExportation.ml @@ -183,9 +183,19 @@ let rec pp ~in_type t context = "(function " ^ ppname b ^ " -> " ^ pp ~in_type t ((Some (b,Cic.Decl s))::context) ^ ")") | C.LetIn (b,s,t) -> - let ty,_ = CicTypeChecker.type_of_aux' [] context s CicUniv.oblivion_ugraph in - "(let " ^ ppname b ^ " = " ^ pp ~in_type:false s context ^ " in " ^ - pp ~in_type t ((Some (b,Cic.Def (s,Some ty)))::context) ^ ")" + (match analyze_term context s with + `Type + | `Proof -> + let ty,_ = + CicTypeChecker.type_of_aux' [] context s CicUniv.oblivion_ugraph + in + pp ~in_type t ((Some (b,Cic.Def (s,Some ty)))::context) + | `Term -> + let ty,_ = + CicTypeChecker.type_of_aux' [] context s CicUniv.oblivion_ugraph + in + "(let " ^ ppname b ^ " = " ^ pp ~in_type:false s context ^ " in " ^ + pp ~in_type t ((Some (b,Cic.Def (s,Some ty)))::context) ^ ")") | C.Appl (he::tl) when in_type -> let hes = pp ~in_type he context in let stl = String.concat "," (clean_args_for_ty context tl) in