-
-
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
MTL removal plan #1616
Comments
Will there be a |
Yes and yes. Shall I make an issue later to vote on the name once this is accepted? |
Yes to #MTLexit |
paging @typelevel/cats |
I'm assuming that the MTL encoding will be something like the following? trait WithState[F[_], S] {
def set(s: S): F[Unit]
def get: F[S]
def modify(f: S => S): F[Unit]
} So no direct compositional encoding (a la scato), and just expecting users to bring in |
Exactly. And a compositional encoding is used for "bundling" type classes on the user end. |
I vote for When picking names, please think of non-native English speakers. I don't know what "mogrify" or "trans-mogrification" means and I'd probably get spelling wrong when searching for it :-) |
I'm 👍 on this assuming that the items in this proposal are an ordered list :). That is, I'd like to see this library take shape and show itself to work before we start removing things from cats. I'm slightly hesitant to see |
@ceedubs how would you define "take shape and show itself to work"? how does that fit into cats' 1.0.0 roadmap? |
@alexandru Regarding the name, I'm pretty sure it's a reference to Calvin and Hobbes. You're absolutely right that it's a terrible name for non-native English speakers. It's actually pretty hard to remember how to spell it even as a native speaker. :-) |
@ceedubs I'm in agreement on that point. I'm working on it at the moment; my hope is that the benefits are obvious from the user's perspective. Edit: I believe there's a rigorous sense in which you can consider @alexandru Agreed, I made the initial repo named |
@kailuowang by "take shape and show itself to work" I'd look for the following items:
As far as how it fits into the Cats 1.0 roadmap, I'm hoping that these items could be accomplished first and that the relevant pieces of Cats could be gone by 1.0. But I'm not the one leading the charge on |
this article can be relevant to testing mtl-like typeclasses in terms of Free |
sounds like we have a consensus here. Should I move this ticket to "in dev" in (github project)? @edmundnoble ? |
Sounds good @kailuowang; got a basic repo (mostly just a clone of cats) up at edmundnoble/cats-mtl. @wedens @ceedubs I'm leaning against using Free for testing, because that seems to mean a) user code needs to use Free and b) Free needs to leak into the definitions of transformers, meaning my goal of removing (Monad) constraints is dead out of the water. The law-testing indicated in that article appears to be RelativeMonad-based albeit based on an initial encoding; I'm going to try to final-tagless it up to move the constraint to the user. |
Just a note: I am not removing the actual MTL transformers themselves from cats because we've got |
After asking in typelevel/cats, I've decided to remove |
@edmundnoble you will move the methods to |
✨ in 1.0.0-MF. |
So, decision time for #1603. Here is my proposal for 1.0.0:
a) Create a library, Transmogrifier, which will contain monad transformer classes, using another law-testing methodology and type class encoding separate from cats'.
a) Remove
MonadReader
,MonadWriter
,MonadState
,FunctorFilter
,TraverseFilter
,MonadFilter
andMonadCombine
from cats, to be substituted in Transmogrifier.b) Provide operations on
Alternative
(orMonad
; if there's a preference let me know) which can stand in for theMonadCombine
operations:unite
andseparate
.c) Keep
MonadError
in cats, at least for now. Edit: WIth an analogue in Transmogrifier.The text was updated successfully, but these errors were encountered: