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@gmail.com> wrote:
сб, 29 июн. 2019 г. в 13:01, Henning Thielemann <lemming@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@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries