-
Notifications
You must be signed in to change notification settings - Fork 65
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
Make launchAff_
operate only on Aff Unit
#202
Comments
+1 from me! It's the same kind of thing |
main :: Effect Unit
main = launchAff_ $ void do
problemNotSolved |
@JordanMartinez I don't understand, can you elaborate? |
I don't really think that's an issue, using |
Ah, I misread the opening issue. The issue is that Please disregard my former comment. |
|
👍 for removing |
Problem
I’m finding launchAff_ to be quite dangerous. When I have an interface that requires an Effect Unit but I need to perform some network calls I usually provide the callback with launchAff_ . Now I ran into a situation where I used launchAff_ on an Aff (Either Error Unit) which is not what I intended. Do you think it would hurt much if launchAff_ only worked on Aff Unit values? That way it would be similar to the warning about implicitly discarding values in a do block.
Describe the solution you'd like
launchAff_
has the signatureAdditional context
I'm aware that this should cause a major version bump since it's a breaking change. I'm hopeful however, that when this change requires somebody to change their code it will improve its clarity or even catch potential bugs.
The text was updated successfully, but these errors were encountered: