-
Notifications
You must be signed in to change notification settings - Fork 67
Description
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 signature
launchAff_ ∷ Aff Unit → Effect Unit
Additional 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.