-
Notifications
You must be signed in to change notification settings - Fork 4
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
defined Alternative #33
Conversation
Thanks @BebeSparkelSparkel ! |
Added to tests. |
I was a bit surprised to read that there isn't a consensus about what the laws for I am a bit hesitant here still. Does it make sense to have @josefs What do you think? |
@andreasabel Alternative is defined for |
Thanks @BebeSparkelSparkel ! Published as 0.4.8. |
Apologies for the late reply, I've been on an extended sick leave. I would have liked to see a good motivating example here. Side effects in Below is the kind of program I'm worried about. The result of this function is
|
Sorry to hear, and glad that your are back! I wish you a good 2024!
@BebeSparkelSparkel: Would you provide such an example?
I am not good a precedences for these operators. I suppose this is the following, right? foo = do
r <- newSTRef 0
((modifySTRef (+1) r >> lift empty) <|> return ())
readSTRef r |
This is not a finished example but is where I am using it
|
Yes. @BebeSparkelSparkel can you explain where in the |
Both
Runs in the Maybe monad. |
Thank for the example @BebeSparkelSparkel . That is indeed a valid usecase as there doesn't seem to be any potential failures after mutation. |
@josefs Thanks for checking on this |
No description provided.