]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/basic_rg/brgEnvironment.ml
helena: warning removed and modifications for λΥP exportation
[helm.git] / helm / software / helena / src / basic_rg / brgEnvironment.ml
index d2daed49a26fc96820331ea5416ebf5de3082a5b..01a38f89ffeffa52e296b023b3816d083f0389f0 100644 (file)
@@ -9,19 +9,26 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
-module U = NUri
-module K = U.UriHash
-module E = Entity
+module U  = NUri
+module UH = U.UriHash
+module G  = Options
+module E  = Entity
 
 let hsize = 7000 
-let env = K.create hsize
+let env = UH.create hsize
 
 (* Interface functions ******************************************************)
 
 (* decps *)
 let set_entity entity =
-   let _, uri, _ = entity in
-   K.add env uri entity; entity
+IFDEF EXPAND THEN
+   let ra, na, uri, b = entity in
+   let entity0 = if !G.expand then ra, E.node_attrs ~apix:0 (), uri, b else entity in
+   UH.add env uri entity0; entity
+ELSE
+   let _, _, uri, _ = entity in
+   UH.add env uri entity; entity
+END
 
 let get_entity uri =
-   try K.find env uri with Not_found -> [], uri, E.Void
+   try UH.find env uri with Not_found -> E.empty_root, E.empty_node, uri, E.Void