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

Params.unapply missing explicit type, doesn't compose, and has lying docs #293

Open
kenbot opened this issue Mar 2, 2015 · 2 comments
Open

Comments

@kenbot
Copy link

kenbot commented Mar 2, 2015

Hi there,
Couldn't find a duplicate, searching for "Params" or "unapply", so raising an issue.

The documentation of unfiltered.request.Params.unapply indicates that it destructures to (Map[...], HttpRequest). This would allow the pattern to be composed with other patterns, since they can be nested into the HttpRequest.

However, contrary to the usual recommended style for public methods, there is no explicit type given. The inferred type actually destructures to only a Map[...], preventing the pattern from being composed, and rather embarrassing the documentation. The behaviour appears to be in all the versions I looked at on Github.

Cheers,
Ken

@kenbot
Copy link
Author

kenbot commented Mar 3, 2015

(Happy to pony up a PR if there's some sort of consensus on what to do.)

@hamnis
Copy link
Contributor

hamnis commented May 1, 2017

We cant change how Params work now, but we could add a ChainableParams extractor or something like that to enable this.

Otherwise I would recommend using unfiltered-directives to chain this better.

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

No branches or pull requests

2 participants