-
-
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
MonadTrans instance for RWST and make MonadTrans serializable #1680
Conversation
@@ -344,6 +344,13 @@ class ReaderWriterStateTTests extends CatsSuite { | |||
checkAll("ReaderWriterStateT[ListWrapper, String, Int, String, Int]", | |||
SemigroupKTests[ReaderWriterStateT[ListWrapper, String, Int, String, ?]].semigroupK[Int]) | |||
} | |||
|
|||
{ | |||
implicit def F = ListWrapper.monad |
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.
Minor: I think that this could be a val
instead of a def
.
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.
copy/pasted it from some code above, so it's not the only place where it should be fixed :)
@@ -235,7 +235,7 @@ class StateTTests extends CatsSuite { | |||
|
|||
checkAll("StateT[ListWrapper, Int, Int]", MonadTests[StateT[ListWrapper, Int, ?]].monad[Int, Int, Int]) | |||
checkAll("Monad[StateT[ListWrapper, Int, ?]]", SerializableTests.serializable(Monad[StateT[ListWrapper, Int, ?]])) | |||
checkAll("MonadTrans[EitherT[?[_], String, ?]]", MonadTransTests[EitherT[?[_], String, ?]].monadTrans[ListWrapper, Int, Int]) | |||
checkAll("MonadTrans[StateT[?[_], Int, ?]]", MonadTransTests[StateT[?[_], String, ?]].monadTrans[ListWrapper, Int, Int]) |
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.
Oops good catch!
@@ -344,6 +344,13 @@ class ReaderWriterStateTTests extends CatsSuite { | |||
checkAll("ReaderWriterStateT[ListWrapper, String, Int, String, Int]", | |||
SemigroupKTests[ReaderWriterStateT[ListWrapper, String, Int, String, ?]].semigroupK[Int]) | |||
} | |||
|
|||
{ | |||
implicit def F = ListWrapper.monad |
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 be checking the serialization laws here too?
Wow that was fast. Thanks @wedens! |
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.
👍 modular the minor comment @ceedubs made
fixed |
I'm not sure how to fix the build. Fails only on non-js 2.12.2
|
Oh @wedens I think that we probably want the |
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 for the quick fix, @wedens
Codecov Report
@@ Coverage Diff @@
## master #1680 +/- ##
=========================================
Coverage ? 93.42%
=========================================
Files ? 242
Lines ? 4075
Branches ? 140
=========================================
Hits ? 3807
Misses ? 268
Partials ? 0
Continue to review full report at Codecov.
|
No description provided.