-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added CommutativeMonoid for Option to scope #3463
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3463 +/- ##
==========================================
+ Coverage 91.60% 92.05% +0.44%
==========================================
Files 382 382
Lines 8315 8316 +1
Branches 210 210
==========================================
+ Hits 7617 7655 +38
+ Misses 698 661 -37 |
implicit def catsKernelSemigroupForTry[A: Semigroup]: Semigroup[Try[A]] = | ||
new TrySemigroup[A](Semigroup[A]) | ||
implicit def catsKernelCommutativeMonoidForOption[A: CommutativeSemigroup]: CommutativeMonoid[Option[A]] = | ||
cats.kernel.instances.option.catsKernelStdCommutativeMonoidForOption[A] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it this was simply missed in @travisbrown's conversion of all these instances? If so, then I'm 👍 on this addition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to remember something being up here, but not any details, and I might be imagining that. In any case this looks reasonable to me now, thanks for fixing it.
Looking at it again I'm wondering if it'd be better in |
I trusted your instinct @travisbrown and in fact there was a problem. This should fix it. I also added a check to verify that the instance is not ambiguous when the type has both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
No description provided.