ident.ml 645 Bytes
Newer Older
1
module U = Encodings.Utf8
2
3
4
5
6
7
8
9
10
11
12
13
14
15

module IdPool = Weak.Make(U)
let id_pool = IdPool.create 17

module Id = struct
  include U
  let mk = IdPool.merge id_pool
  let value x = x
end
type id = U.t
let ident = Id.mk
let to_string id = U.to_string (Id.value id)
let print ppf id = Format.fprintf ppf "%s" (to_string id)

16
module IdSet = SortedList.Make(Id)
17
module IdMap = IdSet.Map
18
module Env = Map.Make(Id)
19
20
type 'a id_map = 'a IdMap.map
type fv = IdSet.t
21

22

23

24
module Label = Ns.QName
25
26

module LabelPool = Pool.Make(Label)
27
module LabelSet = SortedList.Make(LabelPool)
28
29
30
module LabelMap = LabelSet.Map

type label = LabelPool.t
31
type 'a label_map = 'a LabelMap.map