-
Notifications
You must be signed in to change notification settings - Fork 43
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
Prepare for 2.0 release #77
Conversation
I'll finish up tomorrow, unless anyone beats me to it. |
As far as I can tell, I'm not sure what to suggest, since it seems like this the right thing, since the difference is this: the Without the looser constraints we can't have |
Maybe the answer is to use the |
Does it make sense to break up |
Why not apply (ExceptT f) (ExceptT x) = ExceptT (lift2 ($) <$> f <*> x) ? Do you mean they're not equal in terms of what gets evaluated? True, but they're observationally equivalent, right? |
That is how I changed apply for Honestly I have no idea, I stared at it for quite a long time trying to figure out whether the extra |
What do you mean when you say the |
I mean, with the apply version the effects occur for both sides regardless of whether the left fails or succeeds... right? I was going to put something together to try and prove whether it matters or not, but haven't gotten around to it yet. |
(Trying now) |
A good test would be something like Edit: I mean |
It sounds like there is an issue, but we can probably fix it with a |
main :: Eff (console :: CONSOLE) Unit
main = do
void $ runMaybeT $ f <*> a
log "---"
void $ runMaybeT $ ap f a
f :: forall a. MaybeT (Eff (console :: CONSOLE)) (a -> a)
f = do
lift $ log "Hello"
MaybeT $ pure Nothing
a :: MaybeT (Eff (console :: CONSOLE)) String
a = do
lift $ log "LAUNCH THE MISSILES!"
pure "foo"
|
We can definitely define newtype(s) with the desired applicative behaviour, with the caveat that they'll behave in the above way. I think the example above settles the discussion over whether the |
Sounds good |
I'd vote for putting those |
I'm fine with putting them in |
That's supposed to come out of |
Ah ok, interesting. Sounds good then. |
Resolves #72, resolves #63, resolves #60
Still to do:
MonadAsk
/MonadTell
- Proposal:Split MonadReader and MonadWriter #63