Data.HashMap: Strict or lazy by default?

Edward Kmett ekmett at
Sat Feb 19 00:50:54 CET 2011

On Fri, Feb 18, 2011 at 6:36 PM, Isaac Dupree <
ml at> wrote:

> On 02/18/11 18:21, Edward Kmett wrote:
>> Hrmm, the strict version will violate the laws for Functor:
>> (fmap (const 12) . fmap error) /= fmap (const 12 . error)
> That's an issue, though.  It means you can't use a Map that tries to keep
> its values always strict if you want to use class Functor with it.  *Even
> if* it's a separate type in Data.SomeMap.Strict. (Unless you're willing to
> break the law in the presence of _|_ values.)

That was pretty much my point. I think, as Jan-Willem put it, we are in
'violent agreement'. =)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list