Wrong type definition in api-type.html#response-headers

Open Beginner friendly
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
haskell
Domain
documentation

Research direction

Open the response-headers section of api-type.html in the tutorial and compare the UserAPI example with the issue's corrected definition. Update the header type syntax, then verify that the example compiles.

Written by the indexing model from the issue text.

Description

In https://haskell-servant.github.io/tutorial/api-type.html#response-headers, the line

type UserAPI = "users" :> Get '[JSON] (Headers [Header "User-Count" Integer] [User])

should read

type UserAPI = "users" :> Get '[JSON] (Headers '[Header "User-Count" Integer] [User])

otherwise the example won't compile.

Dominant language
Haskell
Stars
18
Forks
21
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell-servant/haskell-servant.github.io

All issues in haskell-servant/haskell-servant.github.io

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.