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

Optional ReqBody does not wrap it’s type into Maybe #1346

Open
unclechu opened this issue Oct 3, 2020 · 0 comments · May be fixed by #1347
Open

Optional ReqBody does not wrap it’s type into Maybe #1346

unclechu opened this issue Oct 3, 2020 · 0 comments · May be fixed by #1347

Comments

@unclechu
Copy link
Contributor

unclechu commented Oct 3, 2020

Here is a minimal reproducible demo that shows the problem: https://gist.github.com/unclechu/347bbc386e0659242de80e8ff38b0ec6 (requires Nix to run). This demo also shows a trick how to overcome the problem.

Even when I define ReqBody with Optional mod:

ReqBody' '[Optional, Strict] '[JSON] SomeType

In the Server type SomeType stays the same, without Maybe wrap that I would also expect from QueryParam for instance.

unclechu added a commit to unclechu/servant that referenced this issue Oct 4, 2020
@unclechu unclechu linked a pull request Oct 4, 2020 that will close this issue
isomorpheme pushed a commit to chordify/servant that referenced this issue Sep 15, 2022
dalpd pushed a commit to dalpd/servant that referenced this issue Nov 29, 2022
unclechu added a commit to unclechu/servant that referenced this issue Nov 29, 2022
isomorpheme pushed a commit to chordify/servant that referenced this issue Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant