Making Int{Map,Set} polymorphic over the key type

David Feuer david.feuer at gmail.com
Sat Jun 29 18:11:01 UTC 2019


toEnum and fromEnum will be coercions for the types you're talking about
anyway.

On Sat, Jun 29, 2019, 1:06 PM Georg Rudoy <0xd34df00d at gmail.com> wrote:

> сб, 29 июн. 2019 г. в 13:01, Henning Thielemann <
> lemming at henning-thielemann.de>:
> > There is already the enummapset package.
>
> Isn't it using fromEnum/toEnum under the hood, which might have bigger
> performance penalty than `coerce`?
>
> On the other hand, sure, the original suggestion can also be made as a
> separate library wrapping IntMap/IntSet and all the calls to coerce.
> I'm happy with that approach too.
>
> --
>   Georg Rudoy
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190629/ef038ca3/attachment.html>


More information about the Libraries mailing list