X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fcommon%2Falpha.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fcommon%2Falpha.ml;h=0000000000000000000000000000000000000000;hb=95872555aaa040a22ad2d93cb1278f79e20da70c;hp=1eb6b106383c0a1623a2a47430ac11dbe62bb61f;hpb=4025c3f5b36025380dcad84bb7a97045d08652f6;p=helm.git diff --git a/helm/software/lambda-delta/src/common/alpha.ml b/helm/software/lambda-delta/src/common/alpha.ml deleted file mode 100644 index 1eb6b1063..000000000 --- a/helm/software/lambda-delta/src/common/alpha.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 E = Entity - -(* internal functions *******************************************************) - -let rec rename ns n = - let token, mode = n in - let n = token ^ "_", mode in - if List.mem n ns then rename ns n else n - -let alpha_name acc attr = - let ns, a = acc in - match attr with - | E.Name n -> - if List.mem n ns then - let n = rename ns n in - n :: ns, E.Name n :: a - else - n :: ns, attr :: a - | _ -> assert false - -(* interface functions ******************************************************) - -let alpha ns a = - let f a names = - let _, names = List.fold_left alpha_name (ns, []) (List.rev names) in - List.rev_append a names - in - E.get_names f a