]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/src/common/alpha.ml
8da7e563b970eedd2a16efb3162476c0b63f2e6f
[helm.git] / helm / software / helena / src / common / alpha.ml
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.              
9      \ /   This software is distributed as is, NO WARRANTY.              
10       V_______________________________________________________________ *)
11
12 module E = Entity
13
14 (* interface functions ******************************************************)
15
16 let rec alpha mem x a =
17    let err () = a in
18    let f () = match a.E.n_name with
19       | None               -> assert false
20       | Some (token, mode) -> alpha mem x {a with E.n_name = Some (token ^ "_", mode)}
21    in
22    mem err f x a