git.iko.soy/typeable/servant
on master help sign in
Merge pull request #1234 from peeley/fix_broken_links_1206

Fixes issue #1206 by updating broken links in tutorial.

commit925d50d7526a9b95918b7a2d49e57afa10985302 authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 8 Oct 2019, 06:23 (7 years ago) parent6cf7c735612772
3 files changed+16−3
changelog.d/issue1206+13 doc/tutorial/Authentication.lhs+1−1 doc/tutorial/Client.lhs+2−2
changelog.d/issue1206new file+13
@@ -0,0 +1,13 @@
1+synopsis: Fix broken links in Tutorial documentation.
2+issues: #1206
3+
4+description: {
5+
6+ In servant/doc/tutorial/Client.lhs, several links point to an .lhs file,
7+ which show as broken in the live web documentation. Changing the suffix to
8+ .html displays the correct documentation.
9+
10+ In servant/doc/tutorial/Authentication.lhs, a link to GHC documentation for
11+ Type Families pointed to a 404'd page. A link to existing GHC documentation
12+ was substituted.
13+}
doc/tutorial/Authentication.lhs+1−1
@@ -318,7 +318,7 @@ genAuthAPI = Proxy
318318
319319Now we need to bring everything together for the server. We have the
320320`AuthHandler Request Account` value and an `AuthProtected` endpoint. To bind these
321−together, we need to provide a [Type Family](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/type-families.html)
321+together, we need to provide a [Type Family](https://downloads.haskell.org/~ghc/8.8.1/docs/html/users_guide/glasgow_exts.html#type-families)
322322instance that tells the `HasServer` instance that our `Context` will supply a
323323`Account` (via `AuthHandler Request Account`) and that downstream combinators will
324324have access to this `Account` value (or an error will be thrown if authentication
doc/tutorial/Client.lhs+2−2
@@ -1,9 +1,9 @@
11# Querying an API
22
3−While defining handlers that [serve an API](Server.lhs) has a lot to it, querying an API is simpler: we do not care about what happens inside the webserver, we just need to know how to talk to it and get a response back. That said, we usually have to write the querying functions by hand because the structure of the API isn't a first class citizen and can't be inspected to generate the client-side functions.
3+While defining handlers that [serve an API](Server.html) has a lot to it, querying an API is simpler: we do not care about what happens inside the webserver, we just need to know how to talk to it and get a response back. That said, we usually have to write the querying functions by hand because the structure of the API isn't a first class citizen and can't be inspected to generate the client-side functions.
44
55**servant** however has a way to inspect APIs, because APIs are just Haskell types and (GHC) Haskell lets us do quite a few things with types. In the same way that we look at an API type to deduce the types the handlers should have, we can inspect the structure of the API to *derive* Haskell functions that take one argument for each occurrence of `Capture`, `ReqBody`, `QueryParam`
6−and friends (see [the tutorial introduction](ApiType.lhs) for an overview). By *derive*, we mean that there's no code generation involved - the functions are defined just by the structure of the API type.
6+and friends (see [the tutorial introduction](ApiType.html) for an overview). By *derive*, we mean that there's no code generation involved - the functions are defined just by the structure of the API type.
77
88The source for this tutorial section is a literate Haskell file, so first we need to have some language extensions and imports:
99