[Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

Johan Tibell johan.tibell at gmail.com
Wed Feb 23 17:11:29 CET 2011

On Wed, Feb 23, 2011 at 4:56 AM, Victor Nazarov
<asviraspossible at gmail.com> wrote:
> What about making Hashable subclass of Eq
>    class Eq a => Hashable a where
> I think it's is obvious from Hasable class properties that some kind
> of equality is needed and I think it will reduce type class
> constraints in actual hash table implementation in
> unordered-containers package.

The documentation could perhaps be worded better: if 'a' is also an
instance of 'Eq', then the stated property should hold. You can
imagine things that can be hashed by not compared for equality. Also,
I don't know if type classes are a good way to model sub-typing
relationships (see Oleg's email about the Functor/Applicative/Monad


More information about the Haskell-Cafe mailing list