Make defaultMakeClientRequest not depend on IO #1789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
IO
wrap for the return type of this function was never necessary. Inside the function there’s onlyreturn
call that wraps a pure value intoIO
. There is nothing else that would be related toIO
. TheIO
wrap was introduced in 9df16f9In order to not break the API again the wrap was preserved but this change makes it to depend on any
Applicative
instead ofIO
. So it still works inIO
/MonadIO
context but allows to use something likeData.Functor.Identity
to work with pure values.See for more context:
#1595