]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/common/hierarchy.ml
some interfaces improved
[helm.git] / helm / software / lambda-delta / common / hierarchy.ml
index abe23e10a04e4a195bd1e6592e2747deac003818..375390bdca10aec79410cef305c2345c2a6735e2 100644 (file)
@@ -16,8 +16,7 @@ module C = Cps
 type graph = string * (int -> int)
 
 let sorts = 2
-let sort = H.create sorts 
-let index = ref 0
+let sort = H.create sorts
 
 (* Internal functions *******************************************************)
 
@@ -26,9 +25,8 @@ let set_sort f (h:int) (s:string) =
 
 (* Interface functions ******************************************************)
 
-let set_new_sorts f ss =
-   let f i = index := i; f i in   
-   C.list_fold_left f set_sort !index ss 
+let set_sorts f ss i =   
+   C.list_fold_left f set_sort i ss
 
 let get_sort err f h =
    try f (H.find sort h) with Not_found -> err ()