-
Notifications
You must be signed in to change notification settings - Fork 37
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
Provide HasForeign instance for servant-foreign #5
Comments
@felixSchl If you're willing to throw some hours into this (and/or anyone else really), I (and maybe @phadej too) would definitely be around to help, explain things, etc. I'm sure servant-multipart will one day have support for -client, -foreign and what not, but I'm afraid that has to happen on an on-demand basis. I put together the package as it is now so that at least everyone could handle server-side multipart file uploads, but it is indeed currently missing support for all the other interpretations. |
@felixSchl to clarify, you want to upload files from PureScript app? otherwise you could split your API into one having I mean, it would be great to be able to upload files from foreign languages, but there is no work done in that direction. I'd personally start with |
I've just looked into this. It turns out that it is easy to create an instance, but it is impossible to create the correct instance -- without patching Here is an instance along with the javascript that gets generated:
...and...
What we want to do here to make this work is get rid of Apparently the way to do this is to add a new member to E.g. it could be something like But yeah basically this requires patching |
That's not a problem, I think supporting more interpretations (client, foreign, etc) for -multipart would be great and if the patches make sense we'd be happy to take them, in the core servant libs. @afcady Would you like to give it a shot? |
OK, I did it! I bumped the version on |
Sad :( |
Because the PRs have been up for 2 weeks but did not get merged yet? We're doing our best to review things promptly, but it's not always possible. Sorry for the inconvenience. |
I reviewed your PRs. Sorry for the delay. |
My use case is I am using
servant-purescript
to generate purescript code from my API, but since there is noHasForeign
instance forServant.Multipart.MultipartForm
, compilation fails. I wish I could contribute a patch for this but at the time of this writing, theHasForeign
typeclass and it's instances are beyond my graspThe text was updated successfully, but these errors were encountered: