-module T =
-struct
- type t = string
-
- (* special tag which denotes attribute nodes, should not be a valid
- xml tag name *)
- let attribute = "<@>"
- (* Likewise for strings *)
- let pcdata = "<$>"
-
- let compare : t -> t -> int = String.compare
-
- let hash (s:t) =
- let rec loop acc = function
- | -1 -> acc
- | n -> loop (( acc lsl 6 ) + (acc lsl 16) - acc + (Char.code s.[n])) (n-1)
-
- in
- loop 0 ((String.length s)-1)
-
- let equal x y = compare x y == 0
-end