Request to Include cats.data.Coproduct and cats.free.Inject#671
Conversation
|
This looks like a great PR! I'm on a train so I can't do a detailed review yet, but on the surface it looks great. Thanks for updating the tutorial and including tests as well! 🐈 |
|
This is awesome, thanks! Looks like there is a legitimate build failure - I'm guessing Other than that, lots of tests, lots of doc, I like it 👍 |
There was a problem hiding this comment.
Minor: let's go ahead and make this class final to be consistent with other Ops classes.
|
Thanks a bunch @raulraja. I left some minor comments, but in general this is very clean, has good test coverage, and even comes with a great tutorial! 💯 |
Current coverage is
|
|
@ceedubs @adelbertc @non addressed all your comments, let me know if anything else can be improved. thx! |
There was a problem hiding this comment.
Sorry for the minor details, but could you make the CodproductInstances* traits private[data]? That will make them consistent with the work done in #612.
There was a problem hiding this comment.
No worries, I want to get it right so I understand what the expectations are for future contributions.:) Added those access modifiers also on InjectInstances
…oproduct, A] where the coproduct can be used to compose dispair Free Algebras
|
@ceedubs @adelbertc @non Added |
There was a problem hiding this comment.
Unfortunately, I think this will pick up the same instances as the .traverse check above. That's why I recommended the somewhat bizarre ListWrapper.foldable approach in another comment.
There was a problem hiding this comment.
I see, I'll give that a shot
…ope so they don't pick up those from Traverse and Comonad
|
👍 💯 |
|
👍 Looks good to me! |
|
👍 Thanks @raulraja , awesome PR |
Request to Include `cats.data.Coproduct` and `cats.free.Inject`
The following PR adds
cats.data.Coproductandcats.free.Injectlargely based on those found in Scalaz as in "Data types a la carte" (Swierstra 2008).Coproduct&Injectcan be used to compose Free based Algebras where an Application is nothing but the Coproduct resulting from the interaction of it's algebras.In other words:
Interpreters omitted for simplicity but available in the free monads tutorial and Inject tests.
@non @ceedubs thanks for your consideration.