-
Notifications
You must be signed in to change notification settings - Fork 529
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 Random materializers for monad transformers #1850
Conversation
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.
This is great! Just a couple super-minor changes. I'm thinking that the mima compatibility failures are spurious? Need to look at them a little closer and could use a second set of eyes.
implicit def catsStateTRandom[F[_]: Random: Applicative, S]: Random[StateT[F, S, *]] = | ||
Random[F].mapK(StateT.liftK) |
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.
This should probably be IndexedStateT
just to be slightly more general
* [[Random]] instance built for `cats.data.ReaderWriterStateT` values | ||
* initialized with any `F` data type that also implements `Random`. | ||
*/ | ||
implicit def catsReaderWriterStateTRandom[ |
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.
Also Indexed
, ideally
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 wasn't aware of the Indexed version, should be ok now 🙂
@djspiewak I agree the mima issues are spurious, looks like the PR branch is based on a |
This closes #1834