if res = 0 then compare s1 s2 else res
;;
+let hash (Ref (uri,spec)) =
+ Hashtbl.hash spec + NUri.hash uri
+;;
+
module OrderedStrings =
struct
type t = string
val eq: reference -> reference -> bool
val compare: reference -> reference -> int
+val hash: reference -> int
val string_of_reference: reference -> string
val reference_of_string: string -> reference
let eq = (==);;
let compare (n1,_) (n2,_) = n2 - n1;;
+let hash (n,_) = n;;
module HT = struct
type t = uri
let equal = eq
let compare = compare
- let hash (n,_) = n;;
+ let hash = hash;;
end;;
module UriHash = Hashtbl.Make(HT);;
val uri_of_string: string -> uri
val eq: uri -> uri -> bool
val compare: uri -> uri -> int
+val hash: uri -> int
module UriHash: Hashtbl.S with type key = uri
module UriMap: Map.S with type key = uri