Optimize Alternative (part 4): add prependK/appendK specializations for Cats monad transformers#4299
Conversation
|
The PR is created as "Draft" because this work was done quite a long ago and I just want to make sure I didn't lose something after lots of merges and rebases. But perhaps it is good to go already. |
bcc20ee to
5d7b27d
Compare
5d7b27d to
84e4788
Compare
|
I've made a deep inhale and re-reviewed the changes here. I would say they look good to me and seems all the tests and Mima checks are happy as well. So I would dare to claim the PR is ready to go) |
84e4788 to
6f16d4b
Compare
Alternative (part 4): add prependK/appendK specializations for Cats monad transformers
e8a4d0e to
0d3d11d
Compare
e2d015c to
fbb3510
Compare
|
I think that all the concerns have been addressed here. Could you take one more look please? |
|
Sorry, haven't forgotten. Rather than "one more look" it needs "one proper look" actually 😅 |
fbb3510 to
7c0f6b1
Compare
| private trait RWSTAlternative1[F[_], E, L, S] | ||
| private trait RWSTNonEmptyAlternative1[F[_], E, L, S] |
There was a problem hiding this comment.
Sorry if I missed it. Did we add law tests for this instance?
There was a problem hiding this comment.
Yep, no worries, here they are:
There was a problem hiding this comment.
Thanks, I mean specifically for the IndexedReaderWriterStateT instance of NonEmptyAlternative.
There was a problem hiding this comment.
Accordingly, AlternativeLaws and AlternativeTests were changed to extend NonEmptyAlternative*:
There was a problem hiding this comment.
@armanbilge is it what you're asking about?
There was a problem hiding this comment.
That part of tests was not changed, though, iirc – it included tests for NonEmptyAlternativeLaws automatically due to the inheritance.
There was a problem hiding this comment.
I see, thanks. I was asking, because for the other instances you added tests using ListWrapper.nonEmptyAlternative in addition to existing tests using the ListWrapper.alternative, as far as I can tell.
There was a problem hiding this comment.
Oh, I see... That's a fair concern.. And honestly, I don't remember why. There are three causes possible:
- I simply forgot to add it.
- I lost it after a series of successive rebases.
- Most likely, little green men came and stole that piece of code from the repo.
But I think, despite of the cause, it makes sense to return it back.
7c0f6b1 to
18de9a4
Compare
|
@armanbilge I added direct
|
18de9a4 to
5315b2a
Compare
1f458ad to
8143774
Compare
629ba67 to
5e5964b
Compare
5e5964b to
e33482c
Compare
e33482c to
62328f1
Compare
693a260 to
7bd1e77
Compare
7bd1e77 to
19480c7
Compare
e76a758 to
7b6c56a
Compare
7b6c56a to
c0c2033
Compare
c0c2033 to
2d5208b
Compare
871b775 to
1fc1b52
Compare
|
Nowadays, there's a lot of hype on AI technologies around – lots of people try to ruminate on what the AI can or cannot do and how it can be useful or even dangerous to all of us. I personally think though, that at least one of the things that the AI could really help with – is to review such huge and boring PRs like this one. |
1fc1b52 to
f341ab7
Compare
f341ab7 to
dfa64db
Compare
Sorry I dropped the ball on reviewing this 😢 also I think your force-pushes erased my review progress 😅 |
|
Hi, @armanbilge, @johnynek , |
Adds optimized specializations for the new
prependK/appendKmethods introduced in the initial PR (#4014).Previous PRs:
Alternative(part 3): addprependK/appendKspecializations for Cats NE wrappers #4055