[Omake] Case-insensitivity and cons-hashing.
Jason Hickey
jyh at cs.caltech.edu
Thu May 3 12:45:20 PDT 2007
On May 3, 2007, at 12:10 PM, Jason Hickey wrote:
> - Is it required that strong_compare be finer than compare? If
> they are unrelated, then
> perhaps internal_compare or hash_compare is a better name than
> strong_compare.
>
Actually, the above question doesn't make a lot of sense. However,
could the implementation be simpler?
module type HashMarshalEqArgSig =
sig
include HashMarshalArgSig
val coarse_compare : t -> t -> int
end
module MakeHashMarshalEq (Arg : ...) =
struct
include MakeHashMarshal (Arg);;
(* Save the comparison (optional) *)
let strong_compare = compare
(* Replace the comparison with the coarser one *)
let compare item1 item2 =
...Arg.coarse_compare...
end
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the OMake-Devel
mailing list