21 Nov
2010
21 Nov
'10
2:13 a.m.
On Sat, Nov 20, 2010 at 3:53 PM, Maciej Piechotka
On Fri, 2010-11-19 at 10:48 +0100, Gregory Collins wrote:
On Thu, Nov 18, 2010 at 11:05 PM, Johan Tibell
wrote: * A type class for things that can be hashed, Hashable.
class Hashable a where hash :: a -> Word
Shouldn't it be:
class Eq a => Hashable a where hash :: a -> Word
Or is there useful case where we want to hash something but it cannot be member of Eq?
I can think of a few. Regardless, constraining the type class in this way doesn't really buy us anything. Johan