Skip to content
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

Document how to use the combinator as a client.. #3

Open
alexanderkjeldaas opened this issue May 16, 2017 · 6 comments
Open

Document how to use the combinator as a client.. #3

alexanderkjeldaas opened this issue May 16, 2017 · 6 comments

Comments

@alexanderkjeldaas
Copy link

.. or change the description to indicate that this is only server-side.

@alpmestan
Copy link
Contributor

It indeed only supports the server interpretation at the moment. If someone feels like implementing the client interpretation, I'm of course willing to help, but don't need it myself. https://hackage.haskell.org/package/http-client-0.5.6.1/docs/Network-HTTP-Client-MultipartFormData.html could be used to that effect but I don't know whether that would require any change to servant-client or not.

@jonathanjouty
Copy link
Contributor

jonathanjouty commented Oct 31, 2019

#26 seems to have (partially? fully?) resolved this, but has not been cut into a new release yet.

@alpmestan
Copy link
Contributor

Yes #26 solves this, and we should make a new release! I'll try to make that happen in the upcoming days.

@jonathanjouty
Copy link
Contributor

Great, thanks @alpmestan, and Hello! :)

Before a new release is made how do you feel about me making genBoundary not depend on IO?
Either by taking a StdGen or using MonadRandom, or anything more abstract than plain IO really!

I am happy to take suggestions on this...

@alpmestan
Copy link
Contributor

alpmestan commented Nov 1, 2019

@jonathanjouty I don't think I'd have any problem with that.

As for the concrete way to make it happen, well I think if you just remove the call to getStdRandom (and possibly adapt the rest of the code to make things typecheck), then what you get back is something that's parametrised over the concrete RandomGen implementation, isn't it? That should be fairly straightforward, and since that genBoundary is supposed to be a helper that users need to use explicitly, I don't think it'll be a problem to make it work in more contexts.

Perhaps you can provide a name for the variant that picks StdGen and returns a boundary in IO? I'll just let you think about the best "presentation" for this change, since you're the one with a concrete use case in his hands.

@jonathanjouty
Copy link
Contributor

since you're the one with a concrete use case in his hands.

Actually, I imagined it! Sorry!
The implementation is perfectly fine as it is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants