]> matita.cs.unibo.it Git - helm.git/commitdiff
* added mysterious function (Claudio can detail on it)
authorLuca Padovani <luca.padovani@unito.it>
Tue, 3 Jun 2003 08:49:32 +0000 (08:49 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Tue, 3 Jun 2003 08:49:32 +0000 (08:49 +0000)
helm/gTopLevel/cic2Xml.ml
helm/gTopLevel/cic2acic.ml
helm/gTopLevel/cic2acic.mli

index 6bef2dd439c6ebe5f223649c9f9f101644357745..b4b1f239ab888476836dd298c0769c94c4c25b93 100644 (file)
@@ -89,7 +89,7 @@ let print_term ~ids_to_inner_sorts =
            X.xml_nempty "PROD" ["type",sort]
             [< List.fold_left
                 (fun i (id,binder,s) ->
-                  let sort = Hashtbl.find ids_to_inner_sorts id in
+                  let sort = Hashtbl.find ids_to_inner_sorts (Cic2acic.source_id_of_id id) in
                    let attrs =
                     ("id",id)::("type",sort)::
                     match binder with
@@ -120,7 +120,6 @@ let print_term ~ids_to_inner_sorts =
             [< List.fold_left
                 (fun i (id,binder,s) ->
                   let sort = Hashtbl.find ids_to_inner_sorts (Cic2acic.source_id_of_id id) in
-                 let _ = prerr_endline ("AHHHHHHHHHHHHHHHHH" ^ sort) in
                    let attrs =
                     ("id",id)::("type",sort)::
                     match binder with
index 93277121428a9b7bc1346d817e9452ec191c6d5e..773050c56fdee0ed556d1cf91d690995cc447512 100644 (file)
@@ -41,6 +41,8 @@ let fresh_id seed ids_to_terms ids_to_father_ids =
    res
 ;;
 
+let source_id_of_id id = "#source#" ^ id;;
+
 exception NotEnoughElements;;
 exception NameExpected;;
 
@@ -172,6 +174,9 @@ let acic_of_cic_context' seed ids_to_terms ids_to_father_ids ids_to_inner_sorts
                 aux' ((Some (n, C.Decl s))::context) (fresh_id''::idrefs) t)
           | C.Lambda (n,s,t) ->
              Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
+            let sourcetype = T.type_of_aux' metasenv context s in
+             Hashtbl.add ids_to_inner_sorts (source_id_of_id fresh_id'')
+              (string_of_sort sourcetype) ;
              if innersort = "Prop" then
               begin
                let father_is_lambda =
index 0cd607bb67888aaa05fe472c49f8af0a9da53e91..b34d34342981c17c50436f97c2c12338bf63a71e 100644 (file)
@@ -26,6 +26,8 @@
 exception NotEnoughElements
 exception NameExpected
 
+val source_id_of_id : string -> string
+
 type anntypes =
  {annsynthesized : Cic.annterm ; annexpected : Cic.annterm option}
 ;;