-
-
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
Add Defer
instances for Eq
, Hash
, Order
, Show
, and variants
#4414
Add Defer
instances for Eq
, Hash
, Order
, Show
, and variants
#4414
Conversation
Note to self: local reproduction of the mima issue
|
I really like the style this enables! |
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.
@armanbilge are we ready to merge? Can you take a second if so?
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.
Looks good, just a couple typos!
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.
The entire job is just great! A few minor nitpicks from me
object EqInstances { | ||
private val catsDeferForEqCache: Defer[Eq] = | ||
new Defer[Eq] { | ||
case class Deferred[A](fa: () => Eq[A]) extends Eq[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.
Just a stylish nitpick that perhaps doesn't affect anything. I'm not confident about putting underlying classes to the value instantiation.
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 don't usually use this style, and went with it to remain consistent with the existing instances (like cats.instances.FunctionInstancesBinCompat0#catsSddDeferForFunction0
).
As I usually avoid it for stylistic reasons, I'm not familiar with the practical concerns around doing it this way, so I'd be interested in hearing why you're worried about it.
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Defer
instances for Eq
, Hash
, Order
, Show
, and variants
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!
Implements #4413