-
-
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 minimal WriterT implementation. #542
Conversation
package cats | ||
package data | ||
|
||
final case class WriterT[T[_], L, V] (run: T[(L, V)]) { |
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.
Should we change T[_]
to F[_]
? If memory serves, everywhere else we are pretty much using F[_]
(and G[_]
if there are two type constructor params)
Thanks for submitting this! I left some comments, but in general this looks great to me. We should hook this up to some law-checking and tests. If you would be willing to do that on this PR, that would be great. Otherwise, I'm happy to work on that. One other small stylistic note: in other parts of Cats we aren't putting a space in front of Thanks again, @sungiant! |
Hi @ceedubs, thanks for the feedback, I've made a few stylistic changes as per your suggestions. I've not made the Kind-Projector change as I'm not very familiar with how to make the change, how would As for tests, I took a look, but I don't fully understand how the law-checking part works, it would be great if someone in the know could get the ball rolling. |
Current coverage is
|
@sungiant thank you. You should be able to rewrite |
@sungiant I've submitted a PR to your repo that uses kind projector and adds some law-checking and a couple tests. Some things that we should probably do (but I think could wait until subsequent PRs):
|
Add WriterT law-checking and tests
👍 Thanks @sungiant! |
Looks great, thanks! 👍 |
Added minimal WriterT implementation.
No description provided.