]> matita.cs.unibo.it Git - helm.git/blobdiff - components/cic_exportation/cicExportation.ml
Dead code removed.
[helm.git] / components / cic_exportation / cicExportation.ml
index c975ff11e8fb35ff92b192e698611f300af86431..f35cd0e1e73d71996cb46770f5cae758795cc49e 100644 (file)
@@ -45,8 +45,7 @@ let analyze_type context t =
  let rec aux =
   function
      Cic.Sort s -> `Sort s
-   | Cic.Prod (_,_,t)
-   | Cic.Lambda (_,_,t) -> aux t
+   | Cic.Prod (_,_,t) -> aux t
    | _ -> `SomethingElse
  in
  match aux t with
@@ -63,7 +62,9 @@ let ppid =
  let reserved =
   [ "to";
     "mod";
-    "val"
+    "val";
+    "in";
+    "function"
   ]
  in
   function n ->
@@ -182,7 +183,7 @@ 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 t CicUniv.oblivion_ugraph in
+       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 (C.MutInd _ as he::tl) ->
@@ -294,6 +295,10 @@ let rec pp ~in_type t context =
                      let rec aux argsno context =
                       function
                          Cic.Lambda (name,ty,bo) when argsno > 0 ->
+                          let name =
+                           match name with
+                              Cic.Anonymous -> Cic.Anonymous
+                            | Cic.Name n -> Cic.Name (ppid n) in
                           let args,res =
                            aux (argsno - 1) (Some (name,Cic.Decl ty)::context)
                             bo