-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
servant-client: Why defaultMakeClientRequest
had to be changed to return IO
?
#1787
Comments
@arianvp thanks for the link, though trying to read it through it still does not answer my question, changelog says “Run ClientEnv's makeClientRequest in IO.” okay, but why would you ever do that? So that you don’t need to write |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One of my project stopped building, because of a breaking change, the result of
defaultMakeClientRequest
(which is justNetwork.HTTP.Client.Request
) no longershow
able. Because now it returnsIO Request
compared to previously returning justRequest
. I looked at the sources and see only:return Client.defaultRequest ...
So there are actually no side-effects. What’s the point of having this
return
and wrapping the result intoIO
breaking the backward-compatibility? Are there any plans to have some side-effects in the future for this function? Maybe drop a comment about it if that’s true?If this was some kind of a mistake and you don’t want to break API again, maybe at least change the type to
Monad m => ... -> m Request
so one can just use someIdentity
without a need to involveIO
for no reason while previous code written for when it wasIO
would still work and be compatible?The text was updated successfully, but these errors were encountered: