-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support for named routes in servant #71
Comments
An obvious issue is that records fields can have duplicate names accross different modules. This would mean that we would still need to speciy the path (possibly of other names) in the names of the generated functions. |
This is also blocked by servant-foreign not supporting this, so you should probably create an issue there. |
I see, thanks, I created an issue there: haskell-servant/servant#1673 |
Looks like in the latest version of servant.foreign (0.16 as of writing) there is now support for this, though it still just uses the generated names (which tbh I'm fine with). Version 0.16 isn't part of any stack lts yet though, so what I did was copy this into my code:
And then updated my
(Added the |
I'm not sure I get it, I have this error:
Any idea what's going on? |
My guess is that you're missing the
I also have |
Sorry for that, thanks a lot! |
This is fixed |
Are there plans to add support for named routes in servant?
It would be really nice, since the name of the generated functions could be defined by the developers, and functions corresponding to the same route would have the same name in both Haskell and Elm.
The text was updated successfully, but these errors were encountered: