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

Map and SortedMap should have MonoidK instances #2714

Closed
LukaJCB opened this issue Jan 31, 2019 · 7 comments
Closed

Map and SortedMap should have MonoidK instances #2714

LukaJCB opened this issue Jan 31, 2019 · 7 comments

Comments

@LukaJCB
Copy link
Member

LukaJCB commented Jan 31, 2019

Map#++ is associative and should also form a Monoid with Map.empty as the identity :)

@kailuowang
Copy link
Contributor

kailuowang commented Jan 31, 2019

One thing to note is that this one needs to follow the MapInstancesBinCompat0 example - i.e.

  1. Create a new MapInstancesBinCompat1 trait and add the instance there,
  2. find all usages of MapInstancesBinCompat0 and add MapInstancesBinCompat1 there.
  3. add 2 instance tests to cats.tests.MapSuite

@wojciechUrbanski
Copy link
Contributor

I would like to take that one :)

@alexeygorobets
Copy link
Contributor

Hey @wojciechUrbanski! Do you mind If I take this from you?

@wojciechUrbanski
Copy link
Contributor

Hey @alexeygorobets. Sure, go on. Unfortunately i am a little bit occupied right now and cannot continue working on this one.

@alexeygorobets
Copy link
Contributor

Thank you @wojciechUrbanski !

hi @kailuowang
Am I correct that I need to create a separate trait
trait AllInstancesBinCompat4 extends SortedMapInstancesBinCompat1 with MapInstancesBinCompat1
for maintaining binary compatibility?

@kailuowang
Copy link
Contributor

@alexeygorobets that's correct. Thanks!

@rossabaker
Copy link
Member

Fixed by #2744.

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

No branches or pull requests

5 participants