Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EnumMap instances #78

Open
tysonzero opened this issue Jan 2, 2019 · 3 comments
Open

Add EnumMap instances #78

tysonzero opened this issue Jan 2, 2019 · 3 comments

Comments

@tysonzero
Copy link

While I quite like IntMap its use often leads to primitive blindness, and really I probably want some sort of newtype over Int as the key most of the time, such as a DB key or an entity id. EnumMap seems to solve that issue, so I would like to get EnumMap up to par with IntMap on what instances it has.

@tysonzero
Copy link
Author

Mikolaj/enummapset#14

@kozross
Copy link
Contributor

kozross commented Oct 7, 2021

@RyanGlScott Given that we depend on containers already (potentially flagged away), we could probably depend on enummapset too (and also hide it behind a flag). I feel it's a useful package (and data type), and I'd be happy to add those instances.

@RyanGlScott
Copy link
Collaborator

I'm generally cautious about adding new dependencies, as semigroupoids is pretty commonly depended upon. (Yes, cabal build flags exist, but in practice, most people don't finely tune their cabal flags when building packages.)

I do see the utility in the enummapset package, although I don't know if it crosses my personal threshold for incurring an extra dependency just yet. I do with something like EnumMap were part of containers, which would make this an easier pill to swallow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants