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

Why require Ord on map and mapR? #5

Closed
karljs opened this issue Feb 23, 2016 · 3 comments
Closed

Why require Ord on map and mapR? #5

karljs opened this issue Feb 23, 2016 · 3 comments

Comments

@karljs
Copy link

karljs commented Feb 23, 2016

Sorry if I'm missing something obvious, but why do you have the Ord constraint on map and mapR?

@joelwilliamson
Copy link
Owner

Data.Map.mapKeys has an Ord constraint.

@joelwilliamson
Copy link
Owner

To expand, a Bimap is a pair of maps, one from a to b, and the other from b to a. Whenever a key or value type is changed, it must have an Ord constraint for the map keyed on that type to work.

@karljs
Copy link
Author

karljs commented Feb 24, 2016

Thanks, I understand. I was thinking, stupidly, that you wouldn't need to map across the keys for some reason since you store both maps.

@karljs karljs closed this as completed Feb 24, 2016
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

2 participants