]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/common/library.ml
- we implemented the hierarchy and sort names declaration in text parser
[helm.git] / helm / software / lambda-delta / common / library.ml
index 25bca63a9e3a1cbb8557c40bf03616272b49e75b..75afcc52dfb3b4bf892f23c6ad0f43545fffcbc8 100644 (file)
@@ -9,8 +9,7 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
-module F = Format
-module N = Filename
+module F = Filename
 module U = NUri
 module C = Cps
 module H = Hierarchy
@@ -27,7 +26,7 @@ let root = "ENTITY"
 let system = "http://helm.cs.unibo.it/lambda-delta/" ^ base ^ "/ld.dtd"
 
 let path_of_uri uri =
-   N.concat base (Str.string_after (U.string_of_uri uri) 3)
+   F.concat base (Str.string_after (U.string_of_uri uri) 3)
 
 (* interface functions ******************************************************)
 
@@ -106,9 +105,9 @@ let mark a =
    let f i = "mark", string_of_int i in
    Y.mark err f a
 
-let export_entity pp_term si (a, u, b) =
+let export_entity pp_term si (a, u, b) =
    let path = path_of_uri u in
-   let _ = Sys.command (Printf.sprintf "mkdir -p %s" (N.dirname path)) in
+   let _ = Sys.command (Printf.sprintf "mkdir -p %s" (F.dirname path)) in
    let och = open_out (path ^ obj_ext) in
    let out = output_string och in
    xml out "1.0" "UTF-8"; doctype out root system;
@@ -116,10 +115,11 @@ let export_entity pp_term si g (a, u, b) =
    let attrs = [uri u; name a; mark a] in 
    let contents = match b with
       | Y.Abst w -> tag "ABST" attrs ~contents:(pp_term w) 
-      | Y.Abbr v -> tag "ABBR" attrs ~contents:(pp_term v) 
+      | Y.Abbr v -> tag "ABBR" attrs ~contents:(pp_term v)
+      | Y.Void   -> assert false
    in
    let opts = if si then "si" else "" in
-   let shp = H.string_of_graph C.start g in
+   let shp = H.string_of_graph () in
    let attrs = ["hierarchy", shp; "options", opts] in
    tag root attrs ~contents out 0;
    close_out och