X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_ag%2FbagEnvironment.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_ag%2FbagEnvironment.ml;h=0000000000000000000000000000000000000000;hb=95872555aaa040a22ad2d93cb1278f79e20da70c;hp=30e3e992f2ed4f00e8375f0fdfd9c7ff4798545d;hpb=4025c3f5b36025380dcad84bb7a97045d08652f6;p=helm.git diff --git a/helm/software/lambda-delta/src/basic_ag/bagEnvironment.ml b/helm/software/lambda-delta/src/basic_ag/bagEnvironment.ml deleted file mode 100644 index 30e3e992f..000000000 --- a/helm/software/lambda-delta/src/basic_ag/bagEnvironment.ml +++ /dev/null @@ -1,39 +0,0 @@ -(* - ||M|| This file is part of HELM, an Hypertextual, Electronic - ||A|| Library of Mathematics, developed at the Computer Science - ||T|| Department, University of Bologna, Italy. - ||I|| - ||T|| HELM is free software; you can redistribute it and/or - ||A|| modify it under the terms of the GNU General Public License - \ / version 2 or (at your option) any later version. - \ / This software is distributed as is, NO WARRANTY. - V_______________________________________________________________ *) - -module U = NUri -module L = Log -module K = U.UriHash -module E = Entity -module Z = Bag - -exception ObjectNotFound of Z.message - -let hsize = 7000 -let env = K.create hsize - -(* Internal functions *******************************************************) - -let get_age = - let age = ref 0 in - fun () -> incr age; !age - -let error uri = raise (ObjectNotFound (L.items1 (U.string_of_uri uri))) - -(* Interface functions ******************************************************) - -let set_entity f (a, uri, b) = - let age = get_age () in - let entry = (E.Apix age :: a), uri, b in - K.add env uri entry; f entry - -let get_entity f uri = - try f (K.find env uri) with Not_found -> error uri