RFC: Adding a Hashable type class and HashMap/HashSet data types to HP

Yitzchak Gale gale at sefer.org
Thu Nov 25 08:10:07 EST 2010


I wrote:
>> More interesting are Maybe, Either, lists, tuples, Data.Map, Data.Set,
>> etc. These are far from trivial; I did some work on it for Python. If you
>> think you can just do something fairly simple and reasonable and hope
>> that it will have the right statistical properties, I promise you that it won't
>> work.

Thomas Schilling wrote:
> Are you referring to the hash function or to the fact that you want
> structurally different types to map to different hashes?

The former. In Python, where objects of varying types will be inserted
into the same hash table, the latter is also important. But why should
we care about that in Haskell? If people circumvent the type system
by serializing before hashing, I don't think we can help them very much.
Or perhaps I am misunderstanding you.

Thanks,
Yitz


More information about the Libraries mailing list