on master help sign in
Fix typos and grammar (#1304)
b9d8fbcJan Hrcek
CONTRIBUTING.md+1−1
@@ -103,7 +103,7 @@ the `news` label if you make a new package so we can know about it!
103
103
104## Release policy
104## Release policy
105
105
106−We are currently moving to a more aggresive release policy, so that you can get
106+We are currently moving to a more aggressive release policy, so that you can get
107what you contribute from Hackage fairly soon. However, note that prior to major
107what you contribute from Hackage fairly soon. However, note that prior to major
108releases it may take some time in between releases.
108releases it may take some time in between releases.
109
109
README.md+2−2
@@ -32,7 +32,7 @@ See `CONTRIBUTING.md`
32 - It's a good idea to separate these steps, as tests often pass, if they compile :)
32 - It's a good idea to separate these steps, as tests often pass, if they compile :)
33 - See `cabal.project` to selectively `allow-newer`
33 - See `cabal.project` to selectively `allow-newer`
34 - If some packages are broken, on your discretisation there are two options:
34 - If some packages are broken, on your discretisation there are two options:
35− - Fix them and make PRs: it's good idea to test against older `servant` version too.
35+ - Fix them and make PRs: it's a good idea to test against older `servant` version too.
36 - Temporarily comment out broken package
36 - Temporarily comment out broken package
37 - If you make a commit for `servant-universe`, you can use it as submodule in private projects to test even more
37 - If you make a commit for `servant-universe`, you can use it as submodule in private projects to test even more
38- When ripples are cleared out:
38- When ripples are cleared out:
@@ -60,7 +60,7 @@ constraints:
60 troublemaker <13.37 && > 13.37
60 troublemaker <13.37 && > 13.37
61```
61```
62
62
63−## TechEmpower framework bechmarks
63+## TechEmpower framework benchmarks
64
64
65We develop and maintain the servant TFB entry in https://github.com/haskell-servant/FrameworkBenchmarks/
65We develop and maintain the servant TFB entry in https://github.com/haskell-servant/FrameworkBenchmarks/
66
66
doc/cookbook/basic-streaming/Streaming.lhs+4−1
@@ -8,7 +8,10 @@ In other words, without streaming libraries.
8- Some basic usage doesn't require usage of streaming libraries,
8- Some basic usage doesn't require usage of streaming libraries,
9 like `conduit`, `pipes`, `machines` or `streaming`.
9 like `conduit`, `pipes`, `machines` or `streaming`.
10 We have bindings for them though.
10 We have bindings for them though.
11−- This is similar example file, which is bundled with each of the packages (TODO: links)
11+- Similar example is bundled with each of our streaming library interop packages (see
12+[servant-pipes](https://github.com/haskell-servant/servant/blob/master/servant-pipes/example/Main.hs),
13+[servant-conduit](https://github.com/haskell-servant/servant/blob/master/servant-conduit/example/Main.hs) and
14+[servant-machines](https://github.com/haskell-servant/servant/blob/master/servant-machines/example/Main.hs))
12- `SourceT` doesn't have *Prelude* with handy combinators, so we have to write
15- `SourceT` doesn't have *Prelude* with handy combinators, so we have to write
13 things ourselves. (Note to self: `mapM` and `foldM` would be handy to have).
16 things ourselves. (Note to self: `mapM` and `foldM` would be handy to have).
14
17
doc/cookbook/curl-mock/CurlMock.lhs+1−1
@@ -1,7 +1,7 @@
1# Generating mock curl calls
1# Generating mock curl calls
2
2
3In this example we will generate curl requests with mock post data from a servant API.
3In this example we will generate curl requests with mock post data from a servant API.
4−This may be usefull for testing and development purposes.
4+This may be useful for testing and development purposes.
5Especially post requests with a request body are tedious to send manually.
5Especially post requests with a request body are tedious to send manually.
6
6
7Also, we will learn how to use the servant-foreign library to generate stuff from servant APIs.
7Also, we will learn how to use the servant-foreign library to generate stuff from servant APIs.
doc/cookbook/db-mysql-basics/MysqlBasics.lhs+1−1
@@ -2,7 +2,7 @@
2
2
3This doc will walk through a single-module implementation of a servant API connecting to a MySQL database. It will also include some basic CRUD operations.
3This doc will walk through a single-module implementation of a servant API connecting to a MySQL database. It will also include some basic CRUD operations.
4
4
5−Once you can wrap your head around this implemenation, understanding more complex features like resource pools would be beneficial next steps.
5+Once you can wrap your head around this implementation, understanding more complex features like resource pools would be beneficial next steps.
6
6
7The only *prerequisite* is that you have a MySQL database open on port 3306 of your machine. Docker is an easy way to manage this.
7The only *prerequisite* is that you have a MySQL database open on port 3306 of your machine. Docker is an easy way to manage this.
8
8
doc/cookbook/file-upload/FileUpload.lhs+2−2
@@ -90,8 +90,8 @@ startServer = run 8080 (serve api upload)
90
90
91Finally, a main function that brings up our server and
91Finally, a main function that brings up our server and
92sends some test request with `http-client` (and not
92sends some test request with `http-client` (and not
93−servant-client this time, has servant-multipart does not
93+servant-client this time, as servant-multipart does not
94−yet have support for client generation.
94+yet have support for client generation).
95
95
96``` haskell
96``` haskell
97main :: IO ()
97main :: IO ()
doc/cookbook/generic/Generic.lhs+3−3
@@ -43,13 +43,13 @@ api :: Proxy (ToServantApi Routes)
43api = genericApi (Proxy :: Proxy Routes)
43api = genericApi (Proxy :: Proxy Routes)
44```
44```
45
45
46−It's recommented to use `genericApi` function, as then you'll get
46+It's recommended to use `genericApi` function, as then you'll get
47better error message, for example if you forget to `derive Generic`.
47better error message, for example if you forget to `derive Generic`.
48
48
49## Links
49## Links
50
50
51The clear advantage of record-based generics approach, is that
51The clear advantage of record-based generics approach, is that
52−we can get safe links very conviently. We don't need to define endpoint types,
52+we can get safe links very conveniently. We don't need to define endpoint types,
53as field accessors work as proxies:
53as field accessors work as proxies:
54
54
55```haskell
55```haskell
@@ -67,7 +67,7 @@ routesLinks = allFieldLinks
67## Client
67## Client
68
68
69Even more power starts to show when we generate a record of client functions.
69Even more power starts to show when we generate a record of client functions.
70−Here we use `genericClientHoist` function, which let us simultaneously
70+Here we use `genericClientHoist` function, which lets us simultaneously
71hoist the monad, in this case from `ClientM` to `IO`.
71hoist the monad, in this case from `ClientM` to `IO`.
72
72
73```haskell
73```haskell
doc/cookbook/hoist-server-with-context/HoistServerWithContext.lhs+1−1
@@ -254,7 +254,7 @@ loginHandler cookieSettings jwtSettings form = do
254 liftIO $ pushLogStrLn logset $ toLogStr logMsg
254 liftIO $ pushLogStrLn logset $ toLogStr logMsg
255 throwError err401
255 throwError err401
256 Just applyCookies -> do
256 Just applyCookies -> do
257− let successMsg = logMsg{message = "AdminUser succesfully authenticated!"}
257+ let successMsg = logMsg{message = "AdminUser successfully authenticated!"}
258 liftIO $ pushLogStrLn logset $ toLogStr successMsg
258 liftIO $ pushLogStrLn logset $ toLogStr successMsg
259 pure $ applyCookies successMsg
259 pure $ applyCookies successMsg
260loginHandler _ _ _ = throwError err401
260loginHandler _ _ _ = throwError err401
doc/cookbook/open-id-connect/OpenIdConnect.lhs+7−7
@@ -8,7 +8,7 @@ some login token would be saved in the user agent local storage.
8
8
9Workflow:
9Workflow:
10
10
11−1. user is presentend with a login button,
11+1. user is presented with a login button,
122. when the user click on the button it is redirected to the OIDC
122. when the user click on the button it is redirected to the OIDC
13 provider,
13 provider,
143. the user login in the OIDC provider,
143. the user login in the OIDC provider,
@@ -222,8 +222,8 @@ The `AuthInfo` is about the infos we can grab from OIDC provider.
222To be more precise, the user should come with a `code` (a token) and
222To be more precise, the user should come with a `code` (a token) and
223POSTing that code to the correct OIDC provider endpoint should return a JSON
223POSTing that code to the correct OIDC provider endpoint should return a JSON
224object. One of the field should be named `id_token` which should be a
224object. One of the field should be named `id_token` which should be a
225−JWT containing all the informations we need. Depending on the scopes we
225+JWT containing all the information we need. Depending on the scopes we
226−asked we might get more informations.
226+asked we might get more information.
227
227
228``` haskell
228``` haskell
229-- | @AuthInfo@
229-- | @AuthInfo@
@@ -248,13 +248,13 @@ instance JSON.ToJSON AuthInfo where
248type LoginHandler = AuthInfo -> IO (Either Text User)
248type LoginHandler = AuthInfo -> IO (Either Text User)
249```
249```
250
250
251−The `handleLoggedIn` is that part that will retrieve the informations from
251+The `handleLoggedIn` is that part that will retrieve the information from
252the user once he is redirected from the OIDC Provider after login.
252the user once he is redirected from the OIDC Provider after login.
253
253
254If the user is redirected to the `redirect_uri` but with an `error` query
254If the user is redirected to the `redirect_uri` but with an `error` query
255parameter then it means something goes wrong.
255parameter then it means something goes wrong.
256If there is no error query param but a `code` query param it means the user
256If there is no error query param but a `code` query param it means the user
257−sucessfully logged in. From there we need to make a request to the token
257+successfully logged in. From there we need to make a request to the token
258endpoint of the OIDC provider. Its a POST that should contains the code
258endpoint of the OIDC provider. Its a POST that should contains the code
259as well as the client id & secret.
259as well as the client id & secret.
260This is the role of the `requestTokens` to make this HTTP POST.
260This is the role of the `requestTokens` to make this HTTP POST.
@@ -332,7 +332,7 @@ data Customer = Customer {
332Here is the code that display the homepage.
332Here is the code that display the homepage.
333It should contain a link to the the `/login` URL.
333It should contain a link to the the `/login` URL.
334When the user will click on this link it will be redirected to Google login page
334When the user will click on this link it will be redirected to Google login page
335−with some generated informations.
335+with some generated information.
336
336
337The page also display the content of the local storage.
337The page also display the content of the local storage.
338And in particular the items `api-key` and `user-id`.
338And in particular the items `api-key` and `user-id`.
@@ -366,7 +366,7 @@ instance ToMarkup Homepage where
366We need some helpers to generate random string for generating state and API Keys.
366We need some helpers to generate random string for generating state and API Keys.
367
367
368``` haskell
368``` haskell
369−-- | generate a random Bystestring, not necessarily extremely good randomness
369+-- | generate a random ByteString, not necessarily extremely good randomness
370-- still the password will be long enough to be very difficult to crack
370-- still the password will be long enough to be very difficult to crack
371genRandomBS :: IO ByteString
371genRandomBS :: IO ByteString
372genRandomBS = do
372genRandomBS = do
doc/cookbook/pagination/Pagination.lhs+8−8
@@ -18,7 +18,7 @@ For example: `Range: createdAt 2017-01-15T23:14:67.000Z; offset 5; order desc` i
18the client is willing to retrieve the next batch of document in descending order that were
18the client is willing to retrieve the next batch of document in descending order that were
19created after the fifteenth of January, skipping the first 5.
19created after the fifteenth of January, skipping the first 5.
20
20
21−As a response, the server may return the list of corresponding document, and augment the
21+As a response, the server may return the list of corresponding documents, and augment the
22response with 3 headers:
22response with 3 headers:
23
23
24- `Accept-Ranges`: A comma-separated list of fields upon which a range can be defined
24- `Accept-Ranges`: A comma-separated list of fields upon which a range can be defined
@@ -127,7 +127,7 @@ defaultRange =
127 getDefaultRange (Proxy @Color)
127 getDefaultRange (Proxy @Color)
128```
128```
129
129
130−Note that `getFieldValue :: Proxy "name" -> Color -> String` is the minimal complete definintion
130+Note that `getFieldValue :: Proxy "name" -> Color -> String` is the minimal complete definition
131of the class. Yet, you can define `getRangeOptions` to provide different parsing options (see
131of the class. Yet, you can define `getRangeOptions` to provide different parsing options (see
132the last section of this guide). In the meantime, we've also defined a `defaultRange` as it will
132the last section of this guide). In the meantime, we've also defined a `defaultRange` as it will
133come in handy when defining our handler.
133come in handy when defining our handler.
@@ -148,7 +148,7 @@ type MyHeaders =
148```
148```
149
149
150`PageHeaders` is a type alias provided by the library to declare the necessary response headers
150`PageHeaders` is a type alias provided by the library to declare the necessary response headers
151−we mentionned in introduction. Expanding the alias boils down to the following:
151+we mentioned in introduction. Expanding the alias boils down to the following:
152
152
153``` haskell
153``` haskell
154-- type MyHeaders =
154-- type MyHeaders =
@@ -165,7 +165,7 @@ not, _servant-pagination_ provides an easy way to lift a collection of resources
165#### Server
165#### Server
166
166
167Time to connect the last bits by defining the server implementation of our colorful API. The `Ranges`
167Time to connect the last bits by defining the server implementation of our colorful API. The `Ranges`
168−type we've defined above (tight to the `Range` HTTP header) indicates the server to parse any `Range`
168+type we've defined above (tied to the `Range` HTTP header) indicates the server to parse any `Range`
169header, looking for the format defined in introduction with fields and target types we have just declared.
169header, looking for the format defined in introduction with fields and target types we have just declared.
170If no such header is provided, we will end up receiving `Nothing`. Otherwise, it will be possible
170If no such header is provided, we will end up receiving `Nothing`. Otherwise, it will be possible
171to _extract_ a `Range` from our `Ranges`.
171to _extract_ a `Range` from our `Ranges`.
@@ -192,7 +192,7 @@ the format we defined, where `<field>` here can only be `name` and `<value>` mus
192- `Range: <field> [<value>][; offset <o>][; limit <l>][; order <asc|desc>]`
192- `Range: <field> [<value>][; offset <o>][; limit <l>][; order <asc|desc>]`
193
193
194Beside the target field, everything is pretty much optional in the `Range` HTTP header. Missing parts
194Beside the target field, everything is pretty much optional in the `Range` HTTP header. Missing parts
195−are deducted from the `RangeOptions` that are part of the `HasPagination` instance. Therefore, all
195+are deduced from the `RangeOptions` that are part of the `HasPagination` instance. Therefore, all
196following examples are valid requests to send to our server:
196following examples are valid requests to send to our server:
197
197
198- 1 - `curl http://localhost:1442/colors -vH 'Range: name'`
198- 1 - `curl http://localhost:1442/colors -vH 'Range: name'`
@@ -219,7 +219,7 @@ The previous ranges reads as follows:
219Note that in the simple above scenario, there's no ambiguity with `extractRange` and `returnRange`
219Note that in the simple above scenario, there's no ambiguity with `extractRange` and `returnRange`
220because there's only one possible `Range` defined on our resource. Yet, as you've most probably
220because there's only one possible `Range` defined on our resource. Yet, as you've most probably
221noticed, the `Ranges` combinator accepts a list of fields, each of which must declare a `HasPagination`
221noticed, the `Ranges` combinator accepts a list of fields, each of which must declare a `HasPagination`
222−instance. Doing so will make the other helper functions more ambiguous and type annotation are
222+instance. Doing so will make the other helper functions more ambiguous and type annotations are
223highly likely to be needed.
223highly likely to be needed.
224
224
225
225
@@ -235,8 +235,8 @@ instance HasPagination Color "hex" where
235#### Parsing Options
235#### Parsing Options
236
236
237By default, `servant-pagination` provides an implementation of `getRangeOptions` for each
237By default, `servant-pagination` provides an implementation of `getRangeOptions` for each
238−`HasPagination` instance. However, this can be overwritten when defining the instance to provide
238+`HasPagination` instance. However, this can be overridden when defining the instance to provide
239−your own options. This options come into play when a `Range` header is received and isn't fully
239+your own options. These options come into play when a `Range` header is received and isn't fully
240specified (`limit`, `offset`, `order` are all optional) to provide default fallback values for those.
240specified (`limit`, `offset`, `order` are all optional) to provide default fallback values for those.
241
241
242For instance, let's say we wanted to change the default limit to `5` in a new range on
242For instance, let's say we wanted to change the default limit to `5` in a new range on
doc/cookbook/sentry/Sentry.lhs+1−1
@@ -79,7 +79,7 @@ It does three things. First it initializes the service which will communicate wi
79
79
80- the Sentry `DSN`, which is obtained when creating a new project on Sentry
80- the Sentry `DSN`, which is obtained when creating a new project on Sentry
81- a default way to update sentry fields, where we use the identity function
81- a default way to update sentry fields, where we use the identity function
82−- an event trasport, which generally would be `sendRecord`, an HTTPS capable trasport which uses http-conduit
82+- an event transport, which generally would be `sendRecord`, an HTTPS capable transport which uses http-conduit
83- a fallback handler, which we choose to be `silentFallback` since later we are logging to the console anyway.
83- a fallback handler, which we choose to be `silentFallback` since later we are logging to the console anyway.
84
84
85In the second step it actually sends our message to Sentry with the `register` function. Its arguments are:
85In the second step it actually sends our message to Sentry with the `register` function. Its arguments are:
doc/cookbook/structuring-apis/StructuringApis.lhs+1−1
@@ -144,7 +144,7 @@ simpleAPIServer
144 :: m [a]
144 :: m [a]
145 -> (i -> m a)
145 -> (i -> m a)
146 -> (a -> m NoContent)
146 -> (a -> m NoContent)
147− -> Server (SimpleAPI name a i) m
147+ -> ServerT (SimpleAPI name a i) m
148simpleAPIServer listAs getA postA =
148simpleAPIServer listAs getA postA =
149 listAs :<|> getA :<|> postA
149 listAs :<|> getA :<|> postA
150
150
doc/cookbook/using-custom-monad/UsingCustomMonad.lhs+1−1
@@ -1,6 +1,6 @@
1# Using a custom monad
1# Using a custom monad
2
2
3−In this section we will create and API for a book shelf without any backing DB storage.
3+In this section we will create an API for a book shelf without any backing DB storage.
4We will keep state in memory and share it between requests using `Reader` monad and `STM`.
4We will keep state in memory and share it between requests using `Reader` monad and `STM`.
5
5
6We start with a pretty standard set of imports and definition of the model:
6We start with a pretty standard set of imports and definition of the model:
doc/cookbook/using-free-client/UsingFreeClient.lhs+1−1
@@ -141,7 +141,7 @@ and calling the continuation. We should get a `Pure` value.
141 Pure n ->
141 Pure n ->
142 putStrLn $ "Expected 1764, got " ++ show n
142 putStrLn $ "Expected 1764, got " ++ show n
143 _ ->
143 _ ->
144− putStrLn "ERROR: didn't got a response"
144+ putStrLn "ERROR: didn't get a response"
145```
145```
146
146
147So that's it. Using `Free` we can evaluate servant clients step-by-step, and
147So that's it. Using `Free` we can evaluate servant clients step-by-step, and
doc/tutorial/Authentication.lhs+6−6
@@ -108,7 +108,7 @@ API with "private." Additionally, the private parts of our API use the
108realm for this authentication is `"foo-realm"`).
108realm for this authentication is `"foo-realm"`).
109
109
110Unfortunately we're not done. When someone makes a request to our `"private"`
110Unfortunately we're not done. When someone makes a request to our `"private"`
111−API, we're going to need to provide to servant the logic for validifying
111+API, we're going to need to provide to servant the logic for validating
112usernames and passwords. This adds a certain conceptual wrinkle in servant's
112usernames and passwords. This adds a certain conceptual wrinkle in servant's
113design that we'll briefly discuss. If you want the **TL;DR**: we supply a lookup
113design that we'll briefly discuss. If you want the **TL;DR**: we supply a lookup
114function to servant's new `Context` primitive.
114function to servant's new `Context` primitive.
@@ -260,7 +260,7 @@ this.
260
260
261Let's implement a trivial authentication scheme. We will protect our API by
261Let's implement a trivial authentication scheme. We will protect our API by
262looking for a cookie named `"servant-auth-cookie"`. This cookie's value will
262looking for a cookie named `"servant-auth-cookie"`. This cookie's value will
263−contain a key from which we can lookup a `Account`.
263+contain a key from which we can lookup an `Account`.
264
264
265```haskell
265```haskell
266-- | An account type that we "fetch from the database" after
266-- | An account type that we "fetch from the database" after
@@ -274,7 +274,7 @@ database = fromList [ ("key1", Account "Anne Briggs")
274 , ("key3", Account "Ghédalia Tazartès")
274 , ("key3", Account "Ghédalia Tazartès")
275 ]
275 ]
276
276
277−-- | A method that, when given a password, will return a Account.
277+-- | A method that, when given a password, will return an Account.
278-- This is our bespoke (and bad) authentication logic.
278-- This is our bespoke (and bad) authentication logic.
279lookupAccount :: ByteString -> Handler Account
279lookupAccount :: ByteString -> Handler Account
280lookupAccount key = case Map.lookup key database of
280lookupAccount key = case Map.lookup key database of
@@ -346,7 +346,7 @@ genAuthServerContext = authHandler :. EmptyContext
346
346
347-- | Our API, where we provide all the author-supplied handlers for each end
347-- | Our API, where we provide all the author-supplied handlers for each end
348-- point. Note that 'privateDataFunc' is a function that takes 'Account' as an
348-- point. Note that 'privateDataFunc' is a function that takes 'Account' as an
349−-- argument. We dont' worry about the authentication instrumentation here,
349+-- argument. We don't worry about the authentication instrumentation here,
350-- that is taken care of by supplying context
350-- that is taken care of by supplying context
351genAuthServer :: Server AuthGenAPI
351genAuthServer :: Server AuthGenAPI
352genAuthServer =
352genAuthServer =
@@ -385,11 +385,11 @@ Creating a generalized, ad-hoc authentication scheme was fairly straight
385forward:
385forward:
386
386
3871. use the `AuthProtect` combinator to protect your API.
3871. use the `AuthProtect` combinator to protect your API.
388−2. choose a application-specific data type used by your server when
388+2. choose an application-specific data type used by your server when
389authentication is successful (in our case this was `Account`).
389authentication is successful (in our case this was `Account`).
3903. Create a value of `AuthHandler Request Account` which encapsulates the
3903. Create a value of `AuthHandler Request Account` which encapsulates the
391authentication logic (`Request -> Handler Account`). This function
391authentication logic (`Request -> Handler Account`). This function
392−will be executed everytime a request matches a protected route.
392+will be executed every time a request matches a protected route.
3934. Provide an instance of the `AuthServerData` type family, specifying your
3934. Provide an instance of the `AuthServerData` type family, specifying your
394application-specific data type returned when authentication is successful (in
394application-specific data type returned when authentication is successful (in
395our case this was `Account`).
395our case this was `Account`).
doc/tutorial/Client.lhs+2−2
@@ -161,7 +161,7 @@ The types of the arguments for the functions are the same as for (server-side) r
161## Changing the monad the client functions live in
161## Changing the monad the client functions live in
162
162
163Just like `hoistServer` allows us to change the monad in which request handlers
163Just like `hoistServer` allows us to change the monad in which request handlers
164−of a web application live in, we also have `hoistClient` for changing the monad
164+of a web application live, we also have `hoistClient` for changing the monad
165in which _client functions_ live. Consider the following trivial API:
165in which _client functions_ live. Consider the following trivial API:
166
166
167``` haskell
167``` haskell
@@ -173,7 +173,7 @@ hoistClientAPI = Proxy
173
173
174We already know how to derive client functions for this API, and as we have
174We already know how to derive client functions for this API, and as we have
175seen above they all return results in the `ClientM` monad when using `servant-client`.
175seen above they all return results in the `ClientM` monad when using `servant-client`.
176−However, `ClientM` rarely (or never) is the actual monad we need to use the client
176+However, `ClientM` is rarely (or never) the actual monad we need to use the client
177functions in. Sometimes we need to run them in IO, sometimes in a custom monad
177functions in. Sometimes we need to run them in IO, sometimes in a custom monad
178stack. `hoistClient` is a very simple solution to the problem of "changing" the monad
178stack. `hoistClient` is a very simple solution to the problem of "changing" the monad
179the clients run in.
179the clients run in.
doc/tutorial/Docs.lhs+2−2
@@ -77,7 +77,7 @@ instance ToSample HelloMessage where
77 [ ("When a value is provided for 'name'", HelloMessage "Hello, Alp")
77 [ ("When a value is provided for 'name'", HelloMessage "Hello, Alp")
78 , ("When 'name' is not specified", HelloMessage "Hello, anonymous coward")
78 , ("When 'name' is not specified", HelloMessage "Hello, anonymous coward")
79 ]
79 ]
80− -- mutliple examples to display this time
80+ -- multiple examples to display this time
81
81
82ci :: ClientInfo
82ci :: ClientInfo
83ci = ClientInfo "Alp" "alp@foo.com" 26 ["haskell", "mathematics"]
83ci = ClientInfo "Alp" "alp@foo.com" 26 ["haskell", "mathematics"]
@@ -108,7 +108,7 @@ apiDocs = docs exampleAPI
108markdown :: API -> String
108markdown :: API -> String
109```
109```
110
110
111−That lets us see what our API docs look down in markdown, by looking at `markdown apiDocs`.
111+That lets us see what our API docs look like in markdown, by looking at `markdown apiDocs`.
112
112
113````````` text
113````````` text
114## GET /hello
114## GET /hello
doc/tutorial/Javascript.lhs+2−2
@@ -228,13 +228,13 @@ data CommonGeneratorOptions = CommonGeneratorOptions
228 {
228 {
229 -- | function generating function names
229 -- | function generating function names
230 functionNameBuilder :: FunctionName -> Text
230 functionNameBuilder :: FunctionName -> Text
231− -- | name used when a user want to send the request body (to let you redefine it)
231+ -- | name used when a user wants to send the request body (to let you redefine it)
232 , requestBody :: Text
232 , requestBody :: Text
233 -- | name of the callback parameter when the request was successful
233 -- | name of the callback parameter when the request was successful
234 , successCallback :: Text
234 , successCallback :: Text
235 -- | name of the callback parameter when the request reported an error
235 -- | name of the callback parameter when the request reported an error
236 , errorCallback :: Text
236 , errorCallback :: Text
237− -- | namespace on which we define the js function (empty mean local var)
237+ -- | namespace on which we define the js function (empty means local var)
238 , moduleName :: Text
238 , moduleName :: Text
239 -- | a prefix that should be prepended to the URL in the generated JS
239 -- | a prefix that should be prepended to the URL in the generated JS
240 , urlPrefix :: Text
240 , urlPrefix :: Text
doc/tutorial/Server.lhs+5−5
@@ -183,7 +183,7 @@ users2 = [isaac, albert]
183
183
184Now, just like we separate the various endpoints in `UserAPI` with `:<|>`, we
184Now, just like we separate the various endpoints in `UserAPI` with `:<|>`, we
185are going to separate the handlers with `:<|>` too! They must be provided in
185are going to separate the handlers with `:<|>` too! They must be provided in
186−the same order as in in the API type.
186+the same order as in the API type.
187
187
188``` haskell
188``` haskell
189server2 :: Server UserAPI2
189server2 :: Server UserAPI2
@@ -716,7 +716,7 @@ $ curl --verbose http://localhost:8081/myfile.txt
716>
716>
717< HTTP/1.1 404 Not Found
717< HTTP/1.1 404 Not Found
718[snip]
718[snip]
719−myfile.txt just isnt there, please leave this server alone.
719+myfile.txt just isn't there, please leave this server alone.
720
720
721$ echo Hello > myfile.txt
721$ echo Hello > myfile.txt
722
722
@@ -818,7 +818,7 @@ If it doesn't exist, the handler will fail with a `404` status code.
818
818
819`serveDirectoryWebApp` uses some standard settings that fit the use case of
819`serveDirectoryWebApp` uses some standard settings that fit the use case of
820serving static files for most web apps. You can find out about the other
820serving static files for most web apps. You can find out about the other
821−options in the documentation of the `Servant.Utils.StaticFiles` module.
821+options in the documentation of the `Servant.Server.StaticFiles` module.
822
822
823## Nested APIs
823## Nested APIs
824
824
@@ -1135,7 +1135,7 @@ true
1135### An arrow is a reader too.
1135### An arrow is a reader too.
1136
1136
1137In previous versions of `servant` we had an `enter` to do what `hoistServer`
1137In previous versions of `servant` we had an `enter` to do what `hoistServer`
1138−does now. `enter` had a ambitious design goals, but was problematic in practice.
1138+does now. `enter` had an ambitious design goals, but was problematic in practice.
1139
1139
1140One problematic situation was when the source monad was `(->) r`, yet it's
1140One problematic situation was when the source monad was `(->) r`, yet it's
1141handy in practice, because `(->) r` is isomorphic to `Reader r`.
1141handy in practice, because `(->) r` is isomorphic to `Reader r`.
@@ -1166,7 +1166,7 @@ back a *stream* of results, served one at a time. Stream endpoints only provide
1166a single content type, and also specify what framing strategy is used to
1166a single content type, and also specify what framing strategy is used to
1167delineate the results. To serve these results, we need to give back a stream
1167delineate the results. To serve these results, we need to give back a stream
1168producer. Adapters can be written to *Pipes*, *Conduit* and the like, or
1168producer. Adapters can be written to *Pipes*, *Conduit* and the like, or
1169−written directly as `SourceIO`s. SourceIO builts upon servant's own `SourceT`
1169+written directly as `SourceIO`s. SourceIO builds upon servant's own `SourceT`
1170stream type (it's simpler than *Pipes* or *Conduit*).
1170stream type (it's simpler than *Pipes* or *Conduit*).
1171The API of a streaming endpoint needs to explicitly specify which sort of
1171The API of a streaming endpoint needs to explicitly specify which sort of
1172generator it produces. Note that the generator itself is returned by a
1172generator it produces. Note that the generator itself is returned by a
servant-client-core/CHANGELOG.md+1−1
@@ -205,7 +205,7 @@
205
205
206- *servant-client-core* Add `hoistClient` to `HasClient`.
206- *servant-client-core* Add `hoistClient` to `HasClient`.
207 Just like `hoistServer` allows us to change the monad in which request handlers
207 Just like `hoistServer` allows us to change the monad in which request handlers
208− of a web application live in, we also have `hoistClient` for changing the monad
208+ of a web application live, we also have `hoistClient` for changing the monad
209 in which *client functions* live.
209 in which *client functions* live.
210 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
210 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
211 ([#936](https://github.com/haskell-servant/servant/pull/936))
211 ([#936](https://github.com/haskell-servant/servant/pull/936))
servant-client-core/servant-client-core.cabal+1−1
@@ -104,7 +104,7 @@ test-suite spec
104 , base-compat
104 , base-compat
105 , servant-client-core
105 , servant-client-core
106
106
107− -- Additonal dependencies
107+ -- Additional dependencies
108 build-depends:
108 build-depends:
109 deepseq >= 1.4.2.0 && < 1.5
109 deepseq >= 1.4.2.0 && < 1.5
110 , hspec >= 2.6.0 && < 2.8
110 , hspec >= 2.6.0 && < 2.8
servant-client/CHANGELOG.md+1−1
@@ -198,7 +198,7 @@
198
198
199- *servant-client-core* Add `hoistClient` to `HasClient`.
199- *servant-client-core* Add `hoistClient` to `HasClient`.
200 Just like `hoistServer` allows us to change the monad in which request handlers
200 Just like `hoistServer` allows us to change the monad in which request handlers
201− of a web application live in, we also have `hoistClient` for changing the monad
201+ of a web application live, we also have `hoistClient` for changing the monad
202 in which *client functions* live.
202 in which *client functions* live.
203 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
203 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
204 ([#936](https://github.com/haskell-servant/servant/pull/936))
204 ([#936](https://github.com/haskell-servant/servant/pull/936))
servant-client/servant-client.cabal+1−1
@@ -120,7 +120,7 @@ test-suite spec
120 , wai
120 , wai
121 , warp
121 , warp
122
122
123− -- Additonal dependencies
123+ -- Additional dependencies
124 build-depends:
124 build-depends:
125 entropy >= 0.4.1.3 && < 0.5
125 entropy >= 0.4.1.3 && < 0.5
126 , hspec >= 2.6.0 && < 2.8
126 , hspec >= 2.6.0 && < 2.8
servant-client/src/Servant/Client/Internal/HttpClient/Streaming.hs+1−1
@@ -130,7 +130,7 @@ withClientM cm env k =
130-- streaming response types ('SourceT', 'Conduit', pipes 'Proxy' or 'Machine').
130-- streaming response types ('SourceT', 'Conduit', pipes 'Proxy' or 'Machine').
131-- For those you have to use 'withClientM'.
131-- For those you have to use 'withClientM'.
132--
132--
133−-- /Note:/ we 'force' the result, so the likehood of accidentally leaking a
133+-- /Note:/ we 'force' the result, so the likelihood of accidentally leaking a
134-- connection is smaller. Use with care.
134-- connection is smaller. Use with care.
135--
135--
136runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ClientError a)
136runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ClientError a)
servant-docs/example/greet.md+1−1
@@ -57,7 +57,7 @@ You'll also note that multiple intros are possible.
57
57
58This is some text
58This is some text
59
59
60−### Second secton
60+### Second section
61
61
62And some more
62And some more
63
63
servant-docs/servant-docs.cabal+1−1
@@ -105,7 +105,7 @@ test-suite spec
105 , servant-docs
105 , servant-docs
106 , string-conversions
106 , string-conversions
107
107
108− -- Additonal dependencies
108+ -- Additional dependencies
109 build-depends:
109 build-depends:
110 tasty >= 1.1.0.4 && < 1.3,
110 tasty >= 1.1.0.4 && < 1.3,
111 tasty-golden >= 2.3.2 && < 2.4,
111 tasty-golden >= 2.3.2 && < 2.4,
servant-docs/src/Servant/Docs/Internal.hs+1−1
@@ -396,7 +396,7 @@ docsWithOptions p = docsFor p (defEndpoint, defAction)
396-- > extraInfo (Proxy :: Proxy ("greet" :> Capture "greetid" Text :> Delete)) $
396-- > extraInfo (Proxy :: Proxy ("greet" :> Capture "greetid" Text :> Delete)) $
397-- > defAction & headers <>~ ["unicorns"]
397-- > defAction & headers <>~ ["unicorns"]
398-- > & notes <>~ [ DocNote "Title" ["This is some text"]
398-- > & notes <>~ [ DocNote "Title" ["This is some text"]
399−-- > , DocNote "Second secton" ["And some more"]
399+-- > , DocNote "Second section" ["And some more"]
400-- > ]
400-- > ]
401
401
402extraInfo :: (IsIn endpoint api, HasLink endpoint, HasDocs endpoint)
402extraInfo :: (IsIn endpoint api, HasLink endpoint, HasDocs endpoint)
servant-foreign/servant-foreign.cabal+1−1
@@ -77,7 +77,7 @@ test-suite spec
77 , servant
77 , servant
78 , servant-foreign
78 , servant-foreign
79
79
80− -- Additonal dependencies
80+ -- Additional dependencies
81 build-depends:
81 build-depends:
82 hspec >= 2.6.0 && <2.8
82 hspec >= 2.6.0 && <2.8
83
83
servant-foreign/test/Servant/ForeignSpec.hs+1−1
@@ -114,7 +114,7 @@ listFromAPISpec = describe "listFromAPI" $ do
114 shouldBe putReq $ defReq
114 shouldBe putReq $ defReq
115 { _reqUrl = Url
115 { _reqUrl = Url
116 [ Segment $ Static "test" ]
116 [ Segment $ Static "test" ]
117− -- Shoud this be |intX| or |listX of intX| ?
117+ -- Should this be |intX| or |listX of intX| ?
118 [ QueryArg (Arg "params" "listX of intX") List ]
118 [ QueryArg (Arg "params" "listX of intX") List ]
119 , _reqMethod = "PUT"
119 , _reqMethod = "PUT"
120 , _reqHeaders = []
120 , _reqHeaders = []
servant-http-streams/servant-http-streams.cabal+1−1
@@ -114,7 +114,7 @@ test-suite spec
114 , wai
114 , wai
115 , warp
115 , warp
116
116
117− -- Additonal dependencies
117+ -- Additional dependencies
118 build-depends:
118 build-depends:
119 entropy >= 0.4.1.3 && < 0.5
119 entropy >= 0.4.1.3 && < 0.5
120 , hspec >= 2.6.0 && < 2.8
120 , hspec >= 2.6.0 && < 2.8
servant-http-streams/test/Servant/ClientSpec.hs+3−3
@@ -77,7 +77,7 @@ _ = client comprehensiveAPIWithoutStreaming
77
77
78spec :: Spec
78spec :: Spec
79spec = describe "Servant.HttpStreams" $ do
79spec = describe "Servant.HttpStreams" $ do
80− sucessSpec
80+ successSpec
81 failSpec
81 failSpec
82 wrappedApiSpec
82 wrappedApiSpec
83 basicAuthSpec
83 basicAuthSpec
@@ -262,8 +262,8 @@ runClientUnsafe x burl = withClientEnvIO burl (runClientMUnsafe x)
262 where
262 where
263 runClientMUnsafe x env = withClientM x env return
263 runClientMUnsafe x env = withClientM x env return
264
264
265−sucessSpec :: Spec
265+successSpec :: Spec
266−sucessSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
266+successSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
267 it "Servant.API.Get root" $ \(_, baseUrl) -> do
267 it "Servant.API.Get root" $ \(_, baseUrl) -> do
268 left show <$> runClient getRoot baseUrl `shouldReturn` Right carol
268 left show <$> runClient getRoot baseUrl `shouldReturn` Right carol
269
269
servant-server/CHANGELOG.md+2−2
@@ -35,7 +35,7 @@
35 Some APIs need query parameters rewriting, e.g. in order to support
35 Some APIs need query parameters rewriting, e.g. in order to support
36 for multiple casing (camel, snake, etc) or something to that effect.
36 for multiple casing (camel, snake, etc) or something to that effect.
37
37
38− This could be easily achieved by using WAI Middleware and modyfing
38+ This could be easily achieved by using WAI Middleware and modifying
39 request's `Query`. But QueryParam, QueryParams and QueryFlag use
39 request's `Query`. But QueryParam, QueryParams and QueryFlag use
40 `rawQueryString`. By using `queryString` rather then `rawQueryString`
40 `rawQueryString`. By using `queryString` rather then `rawQueryString`
41 we can enable such rewritings.
41 we can enable such rewritings.
@@ -44,7 +44,7 @@
44
44
45 We used `build-type: Custom`, but it's problematic e.g.
45 We used `build-type: Custom`, but it's problematic e.g.
46 for cross-compiling. The benefit is small, as the doctests
46 for cross-compiling. The benefit is small, as the doctests
47− can be run other ways too (though not so conviniently).
47+ can be run other ways too (though not so conveniently).
48
48
490.16.2
490.16.2
50------
50------
servant-server/example/README.md+1−1
@@ -1,2 +1,2 @@
1- `greet.hs` shows how to write a simple webservice, run it, query it with automatically-derived haskell functions and print the (generated) markdown documentation for the API.
1- `greet.hs` shows how to write a simple webservice, run it, query it with automatically-derived haskell functions and print the (generated) markdown documentation for the API.
2−- `greet.md` contains the aforementionned generated documentation.
2+- `greet.md` contains the aforementioned generated documentation.
servant-server/servant-server.cabal+1−1
@@ -155,7 +155,7 @@ test-suite spec
155 , transformers-compat
155 , transformers-compat
156 , wai
156 , wai
157
157
158− -- Additonal dependencies
158+ -- Additional dependencies
159 build-depends:
159 build-depends:
160 aeson >= 1.4.1.0 && < 1.5
160 aeson >= 1.4.1.0 && < 1.5
161 , directory >= 1.3.0.0 && < 1.4
161 , directory >= 1.3.0.0 && < 1.4
servant-server/src/Servant/Server/Internal.hs+1−1
@@ -808,7 +808,7 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
808instance TypeError (HasServerArrowKindError arr) => HasServer ((arr :: k -> l) :> api) context
808instance TypeError (HasServerArrowKindError arr) => HasServer ((arr :: k -> l) :> api) context
809 where
809 where
810 type ServerT (arr :> api) m = TypeError (HasServerArrowKindError arr)
810 type ServerT (arr :> api) m = TypeError (HasServerArrowKindError arr)
811− -- it doens't really matter what sub route we peak
811+ -- it doesn't really matter what sub route we peak
812 route _ _ _ = error "servant-server panic: impossible happened in HasServer (arr :> api)"
812 route _ _ _ = error "servant-server panic: impossible happened in HasServer (arr :> api)"
813 hoistServerWithContext _ _ _ = id
813 hoistServerWithContext _ _ _ = id
814
814
servant-server/src/Servant/Server/Internal/BasicAuth.hs+1−1
@@ -32,7 +32,7 @@ import Servant.Server.Internal.ServerError
32-- * Basic Auth
32-- * Basic Auth
33
33
34-- | servant-server's current implementation of basic authentication is not
34-- | servant-server's current implementation of basic authentication is not
35−-- immune to certian kinds of timing attacks. Decoding payloads does not take
35+-- immune to certain kinds of timing attacks. Decoding payloads does not take
36-- a fixed amount of time.
36-- a fixed amount of time.
37
37
38-- | The result of authentication/authorization
38-- | The result of authentication/authorization
servant-server/src/Servant/Server/Internal/Context.hs+1−1
@@ -20,7 +20,7 @@ import GHC.TypeLits
20--
20--
21-- If you are using combinators that require a non-empty 'Context' you have to
21-- If you are using combinators that require a non-empty 'Context' you have to
22-- use 'Servant.Server.serveWithContext' and pass it a 'Context' that contains all
22-- use 'Servant.Server.serveWithContext' and pass it a 'Context' that contains all
23−-- the values your combinators need. A 'Context' is essentially a heterogenous
23+-- the values your combinators need. A 'Context' is essentially a heterogeneous
24-- list and accessing the elements is being done by type (see 'getContextEntry').
24-- list and accessing the elements is being done by type (see 'getContextEntry').
25-- The parameter of the type 'Context' is a type-level list reflecting the types
25-- The parameter of the type 'Context' is a type-level list reflecting the types
26-- of the contained context entries. To create a 'Context' with entries, use the
26-- of the contained context entries. To create a 'Context' with entries, use the
servant-server/src/Servant/Server/Internal/Delayed.hs+1−1
@@ -268,5 +268,5 @@ runAction action env req respond k = runResourceT $
268~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
268~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
269
269
270Due to GHC issue <https://ghc.haskell.org/trac/ghc/ticket/2595 2595>, we cannot
270Due to GHC issue <https://ghc.haskell.org/trac/ghc/ticket/2595 2595>, we cannot
271−do the more succint thing - just update the records we actually change.
271+do the more succinct thing - just update the records we actually change.
272-}
272-}
servant-server/src/Servant/Server/Internal/DelayedIO.hs+1−1
@@ -24,7 +24,7 @@ import Servant.Server.Internal.ServerError
24
24
25-- | Computations used in a 'Delayed' can depend on the
25-- | Computations used in a 'Delayed' can depend on the
26-- incoming 'Request', may perform 'IO', and result in a
26-- incoming 'Request', may perform 'IO', and result in a
27−-- 'RouteResult', meaning they can either suceed, fail
27+-- 'RouteResult', meaning they can either succeed, fail
28-- (with the possibility to recover), or fail fatally.
28-- (with the possibility to recover), or fail fatally.
29--
29--
30newtype DelayedIO a = DelayedIO { runDelayedIO' :: ReaderT Request (ResourceT (RouteResultT IO)) a }
30newtype DelayedIO a = DelayedIO { runDelayedIO' :: ReaderT Request (ResourceT (RouteResultT IO)) a }
servant/CHANGELOG.md+4−4
@@ -41,7 +41,7 @@
41 Some APIs need query parameters rewriting, e.g. in order to support
41 Some APIs need query parameters rewriting, e.g. in order to support
42 for multiple casing (camel, snake, etc) or something to that effect.
42 for multiple casing (camel, snake, etc) or something to that effect.
43
43
44− This could be easily achieved by using WAI Middleware and modyfing
44+ This could be easily achieved by using WAI Middleware and modifying
45 request's `Query`. But QueryParam, QueryParams and QueryFlag use
45 request's `Query`. But QueryParam, QueryParams and QueryFlag use
46 `rawQueryString`. By using `queryString` rather then `rawQueryString`
46 `rawQueryString`. By using `queryString` rather then `rawQueryString`
47 we can enable such rewritings.
47 we can enable such rewritings.
@@ -50,7 +50,7 @@
50
50
51 We used `build-type: Custom`, but it's problematic e.g.
51 We used `build-type: Custom`, but it's problematic e.g.
52 for cross-compiling. The benefit is small, as the doctests
52 for cross-compiling. The benefit is small, as the doctests
53− can be run other ways too (though not so conviniently).
53+ can be run other ways too (though not so conveniently).
54
54
55- *servant* Remove deprecated modules [1268#](https://github.com/haskell-servant/servant/pull/1268)
55- *servant* Remove deprecated modules [1268#](https://github.com/haskell-servant/servant/pull/1268)
56
56
@@ -405,7 +405,7 @@
405
405
406- *servant-client-core* Add `hoistClient` to `HasClient`.
406- *servant-client-core* Add `hoistClient` to `HasClient`.
407 Just like `hoistServer` allows us to change the monad in which request handlers
407 Just like `hoistServer` allows us to change the monad in which request handlers
408− of a web application live in, we also have `hoistClient` for changing the monad
408+ of a web application live, we also have `hoistClient` for changing the monad
409 in which *client functions* live.
409 in which *client functions* live.
410 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
410 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
411 ([#936](https://github.com/haskell-servant/servant/pull/936))
411 ([#936](https://github.com/haskell-servant/servant/pull/936))
@@ -612,7 +612,7 @@
612
612
613 `enter` isn't exported from `Servant` module anymore. You can change
613 `enter` isn't exported from `Servant` module anymore. You can change
614 `enter` to `hoistServer` in a straight forward way.
614 `enter` to `hoistServer` in a straight forward way.
615− Unwrap natural transformation and add a api type `Proxy`:
615+ Unwrap natural transformation and add an api type `Proxy`:
616
616
617 ```diff
617 ```diff
618 -server = enter (NT nt) impl
618 -server = enter (NT nt) impl
servant/servant.cabal+1−1
@@ -157,7 +157,7 @@ test-suite spec
157 , text
157 , text
158 , transformers
158 , transformers
159
159
160− -- Additonal dependencies
160+ -- Additional dependencies
161 build-depends:
161 build-depends:
162 hspec >= 2.6.0 && < 2.8
162 hspec >= 2.6.0 && < 2.8
163 , QuickCheck >= 2.12.6.1 && < 2.15
163 , QuickCheck >= 2.12.6.1 && < 2.15
servant/src/Servant/API/ResponseHeaders.hs+1−1
@@ -95,7 +95,7 @@ type family HeaderValMap (f :: * -> *) (xs :: [*]) where
95
95
96class BuildHeadersTo hs where
96class BuildHeadersTo hs where
97 buildHeadersTo :: [HTTP.Header] -> HList hs
97 buildHeadersTo :: [HTTP.Header] -> HList hs
98− -- ^ Note: if there are multiple occurences of a header in the argument,
98+ -- ^ Note: if there are multiple occurrences of a header in the argument,
99 -- the values are interspersed with commas before deserialization (see
99 -- the values are interspersed with commas before deserialization (see
100 -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 RFC2616 Sec 4.2>)
100 -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 RFC2616 Sec 4.2>)
101
101
servant/src/Servant/Links.hs+3−3
@@ -54,7 +54,7 @@
54-- >>> toUrlPiece $ safeLink api without
54-- >>> toUrlPiece $ safeLink api without
55-- "bye"
55-- "bye"
56--
56--
57−-- If you would like create a helper for generating links only within that API,
57+-- If you would like to create a helper for generating links only within that API,
58-- you can partially apply safeLink if you specify a correct type signature
58-- you can partially apply safeLink if you specify a correct type signature
59-- like so:
59-- like so:
60--
60--
@@ -65,7 +65,7 @@
65-- >>> apiLink = safeLink api
65-- >>> apiLink = safeLink api
66-- >>> :}
66-- >>> :}
67--
67--
68−-- `safeLink'` allows to make specialise the output:
68+-- `safeLink'` allows you to specialise the output:
69--
69--
70-- >>> safeLink' toUrlPiece api without
70-- >>> safeLink' toUrlPiece api without
71-- "bye"
71-- "bye"
@@ -563,7 +563,7 @@ instance HasLink sub => HasLink (AuthProtect tag :> sub) where
563 type MkLink (AuthProtect tag :> sub) a = MkLink sub a
563 type MkLink (AuthProtect tag :> sub) a = MkLink sub a
564 toLink = simpleToLink (Proxy :: Proxy sub)
564 toLink = simpleToLink (Proxy :: Proxy sub)
565
565
566−-- | Helper for implemneting 'toLink' for combinators not affecting link
566+-- | Helper for implementing 'toLink' for combinators not affecting link
567-- structure.
567-- structure.
568simpleToLink
568simpleToLink
569 :: forall sub a combinator.
569 :: forall sub a combinator.