Dr. Thomas Fischbacher wrote:
Alain Frisch wrote:
As long as the data structure supports the polymorphic hash function, it
should work to simply use a regular hash table with the polymorphic hash
function and physical equality, as in:
module S = Hashtbl.Make(struct
type t = Obj.t
let hash = Hashtbl.hash
let equal = (==)
end);;
Why? (I.e. I'm not convinced yet.)
The two functions (hash and equal) are invariant w.r.t. changes of
physical memory location of their arguments.
-- Alain
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs