3 (* Copyright Jeremy Yallop 2007.
4 This file is free software, distributed under the MIT license.
5 See the file COPYING for details.
9 module StringMap
= Map.Make
(String
)
12 let map = ref StringMap.empty
19 try StringMap.find s
!map
21 let fresh = (!counter, String.copy s
) in begin
22 map := StringMap.add s
fresh !map;
27 let to_string (_
,s
) = String.copy s
29 let compare (l
,_
) (r
,_
) = compare l r
30 let eq (l
,_
) (r
,_
) = l
= r