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

Lenient combinator infers to "Either String" #1118

Open
domenkozar opened this Issue Feb 6, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@domenkozar
Copy link
Contributor

domenkozar commented Feb 6, 2019

Using ReqBody' '[Required, Lenient] '[JSON] Events

Expected according to docs is Either Text.

@phadej

This comment has been minimized.

Copy link
Member

phadej commented Feb 6, 2019

It's indeed an inconsistency. one need to modify HasServer (ReqBody ' ...) instance

@McGizzle

This comment has been minimized.

Copy link

McGizzle commented Feb 7, 2019

Hey I'm a heavy user of Servant and would like to get involved in its development.

I think this might be a good first issue? But might need some extra info on what needs to be done before I can start hacking.

@alpmestan

This comment has been minimized.

Copy link
Contributor

alpmestan commented Feb 7, 2019

Hello @McGizzle! This indeed should be a great first issue, the patch for this is quite trivial.

All we need is to change Either String to Either Text in https://github.com/haskell-servant/servant/blob/master/servant-server/src/Servant/Server/Internal.hs#L581, and adapt whatever breaks because of this :-)

@McGizzle

This comment has been minimized.

Copy link

McGizzle commented Feb 7, 2019

Great! I should have some spare time at the weekend so will do that and make a PR :)

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