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

Describe how types and handlers are matched up #3

Open
jerbaroo opened this issue Jul 10, 2017 · 0 comments
Open

Describe how types and handlers are matched up #3

jerbaroo opened this issue Jul 10, 2017 · 0 comments

Comments

@jerbaroo
Copy link

jerbaroo commented Jul 10, 2017

From the README:

When serving the servant application, the types and handlers are automatically matched up according to their names

More detail on the matching process in the README would useful. So people know what behaviour to expect. For example what to expect in this scenario: ?

handler :: Server API
handler = fromNamed $
        Named @"a" := return [1, 2, 3]
  ::<|> Named @"b" := return [1, 2, 3]
  ::<|> Nil

type API = FromNamed (
        Named "c" := "user" :> Get '[JSON] [Int]
  ::<|> Named "d" := "user" :> Get '[JSON] [Int]
  ::<|> Nil )
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

No branches or pull requests

1 participant