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

Johan Tibell johan.tibell at gmail.com
Fri Nov 19 05:23:47 EST 2010


On Fri, Nov 19, 2010 at 10:48 AM, Gregory Collins
<greg at gregorycollins.net> wrote:
> On Thu, Nov 18, 2010 at 11:05 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
>
>> * A type class for things that can be hashed, Hashable.
>>
>> class Hashable a where
>>    hash :: a -> Word
>
> BTW,
>
> An issue that needs to be resolved is: "Where should this change go?" We have a
> couple of options:
>
>  a) Bring http://hackage.haskell.org/package/hashable into the platform
>
>  b) Put the module into base -- probably a -1 for political/logistical reasons
>
>  c) Put it into containers -- probably a -1 because it would force a
>     containers dependency where there was no containers dependency before.

Right. Putting it into containers would force text/bytestring to
depend on containers or vice versa, in order to provide instances.
Base or a separate package are the only options I think.

Johan


More information about the Libraries mailing list