git.iko.soy/typeable/servant
on master help sign in
Fix typos and grammar (#1304)

* Fix typos and grammar * Remove redundant words, fix articles * More language fixes * More typo fixes and resolve TODO about missing links

commitb9d8fbcdc122ca252fa0a136208c1a25457ec61f authorJan Hrcek <2716069+jhrcek@users.noreply.github.com> dateSat 6 Jun 2020, 06:43 (6 years ago) parent67cb564
43 files changed+83−80
CONTRIBUTING.md+1−1 README.md+2−2 doc/cookbook/basic-streaming/Streaming.lhs+4−1 doc/cookbook/curl-mock/CurlMock.lhs+1−1 doc/cookbook/db-mysql-basics/MysqlBasics.lhs+1−1 doc/cookbook/file-upload/FileUpload.lhs+2−2 doc/cookbook/generic/Generic.lhs+3−3 doc/cookbook/hoist-server-with-context/HoistServerWithContext.lhs+1−1 doc/cookbook/open-id-connect/OpenIdConnect.lhs+7−7 doc/cookbook/pagination/Pagination.lhs+8−8 doc/cookbook/sentry/Sentry.lhs+1−1 doc/cookbook/structuring-apis/StructuringApis.lhs+1−1 doc/cookbook/using-custom-monad/UsingCustomMonad.lhs+1−1 doc/cookbook/using-free-client/UsingFreeClient.lhs+1−1 doc/tutorial/Authentication.lhs+6−6 doc/tutorial/Client.lhs+2−2 doc/tutorial/Docs.lhs+2−2 doc/tutorial/Javascript.lhs+2−2 doc/tutorial/Server.lhs+5−5 servant-client-core/CHANGELOG.md+1−1 servant-client-core/servant-client-core.cabal+1−1 servant-client/CHANGELOG.md+1−1 servant-client/servant-client.cabal+1−1 servant-client/src/Servant/Client/Internal/HttpClient/Streaming.hs+1−1 servant-docs/example/greet.md+1−1 servant-docs/servant-docs.cabal+1−1 servant-docs/src/Servant/Docs/Internal.hs+1−1 servant-foreign/servant-foreign.cabal+1−1 servant-foreign/test/Servant/ForeignSpec.hs+1−1 servant-http-streams/servant-http-streams.cabal+1−1 servant-http-streams/test/Servant/ClientSpec.hs+3−3 servant-server/CHANGELOG.md+2−2 servant-server/example/README.md+1−1 servant-server/servant-server.cabal+1−1 servant-server/src/Servant/Server/Internal.hs+1−1 servant-server/src/Servant/Server/Internal/BasicAuth.hs+1−1 servant-server/src/Servant/Server/Internal/Context.hs+1−1 servant-server/src/Servant/Server/Internal/Delayed.hs+1−1 servant-server/src/Servant/Server/Internal/DelayedIO.hs+1−1 servant/CHANGELOG.md+4−4 servant/servant.cabal+1−1 servant/src/Servant/API/ResponseHeaders.hs+1−1 servant/src/Servant/Links.hs+3−3
CONTRIBUTING.md+1−1
@@ -103,7 +103,7 @@ the `news` label if you make a new package so we can know about it!
103103
104104## Release policy
105105
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
107107what you contribute from Hackage fairly soon. However, note that prior to major
108108releases it may take some time in between releases.
109109
README.md+2−2
@@ -32,7 +32,7 @@ See `CONTRIBUTING.md`
3232 - It's a good idea to separate these steps, as tests often pass, if they compile :)
3333 - See `cabal.project` to selectively `allow-newer`
3434 - 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.
3636 - Temporarily comment out broken package
3737 - If you make a commit for `servant-universe`, you can use it as submodule in private projects to test even more
3838- When ripples are cleared out:
@@ -60,7 +60,7 @@ constraints:
6060 troublemaker <13.37 && > 13.37
6161```
6262
63−## TechEmpower framework bechmarks
63+## TechEmpower framework benchmarks
6464
6565We develop and maintain the servant TFB entry in https://github.com/haskell-servant/FrameworkBenchmarks/
6666
doc/cookbook/basic-streaming/Streaming.lhs+4−1
@@ -8,7 +8,10 @@ In other words, without streaming libraries.
88- Some basic usage doesn't require usage of streaming libraries,
99 like `conduit`, `pipes`, `machines` or `streaming`.
1010 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))
1215- `SourceT` doesn't have *Prelude* with handy combinators, so we have to write
1316 things ourselves. (Note to self: `mapM` and `foldM` would be handy to have).
1417
doc/cookbook/curl-mock/CurlMock.lhs+1−1
@@ -1,7 +1,7 @@
11# Generating mock curl calls
22
33In 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.
55Especially post requests with a request body are tedious to send manually.
66
77Also, 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 @@
22
33This 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.
44
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.
66
77The only *prerequisite* is that you have a MySQL database open on port 3306 of your machine. Docker is an easy way to manage this.
88
doc/cookbook/file-upload/FileUpload.lhs+2−2
@@ -90,8 +90,8 @@ startServer = run 8080 (serve api upload)
9090
9191Finally, a main function that brings up our server and
9292sends some test request with `http-client` (and not
93−servant-client this time, has servant-multipart does not
94−yet have support for client generation.
93+servant-client this time, as servant-multipart does not
94+yet have support for client generation).
9595
9696``` haskell
9797main :: IO ()
doc/cookbook/generic/Generic.lhs+3−3
@@ -43,13 +43,13 @@ api :: Proxy (ToServantApi Routes)
4343api = genericApi (Proxy :: Proxy Routes)
4444```
4545
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
4747better error message, for example if you forget to `derive Generic`.
4848
4949## Links
5050
5151The 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,
5353as field accessors work as proxies:
5454
5555```haskell
@@ -67,7 +67,7 @@ routesLinks = allFieldLinks
6767## Client
6868
6969Even 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
7171hoist the monad, in this case from `ClientM` to `IO`.
7272
7373```haskell
doc/cookbook/hoist-server-with-context/HoistServerWithContext.lhs+1−1
@@ -254,7 +254,7 @@ loginHandler cookieSettings jwtSettings form = do
254254 liftIO $ pushLogStrLn logset $ toLogStr logMsg
255255 throwError err401
256256 Just applyCookies -> do
257− let successMsg = logMsg{message = "AdminUser succesfully authenticated!"}
257+ let successMsg = logMsg{message = "AdminUser successfully authenticated!"}
258258 liftIO $ pushLogStrLn logset $ toLogStr successMsg
259259 pure $ applyCookies successMsg
260260loginHandler _ _ _ = 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.
88
99Workflow:
1010
11−1. user is presentend with a login button,
11+1. user is presented with a login button,
12122. when the user click on the button it is redirected to the OIDC
1313 provider,
14143. the user login in the OIDC provider,
@@ -222,8 +222,8 @@ The `AuthInfo` is about the infos we can grab from OIDC provider.
222222To be more precise, the user should come with a `code` (a token) and
223223POSTing that code to the correct OIDC provider endpoint should return a JSON
224224object. 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
226−asked we might get more informations.
225+JWT containing all the information we need. Depending on the scopes we
226+asked we might get more information.
227227
228228``` haskell
229229-- | @AuthInfo@
@@ -248,13 +248,13 @@ instance JSON.ToJSON AuthInfo where
248248type LoginHandler = AuthInfo -> IO (Either Text User)
249249```
250250
251−The `handleLoggedIn` is that part that will retrieve the informations from
251+The `handleLoggedIn` is that part that will retrieve the information from
252252the user once he is redirected from the OIDC Provider after login.
253253
254254If the user is redirected to the `redirect_uri` but with an `error` query
255255parameter then it means something goes wrong.
256256If 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
258258endpoint of the OIDC provider. Its a POST that should contains the code
259259as well as the client id & secret.
260260This is the role of the `requestTokens` to make this HTTP POST.
@@ -332,7 +332,7 @@ data Customer = Customer {
332332Here is the code that display the homepage.
333333It should contain a link to the the `/login` URL.
334334When 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.
336336
337337The page also display the content of the local storage.
338338And in particular the items `api-key` and `user-id`.
@@ -366,7 +366,7 @@ instance ToMarkup Homepage where
366366We need some helpers to generate random string for generating state and API Keys.
367367
368368``` haskell
369−-- | generate a random Bystestring, not necessarily extremely good randomness
369+-- | generate a random ByteString, not necessarily extremely good randomness
370370-- still the password will be long enough to be very difficult to crack
371371genRandomBS :: IO ByteString
372372genRandomBS = 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
1818the client is willing to retrieve the next batch of document in descending order that were
1919created after the fifteenth of January, skipping the first 5.
2020
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
2222response with 3 headers:
2323
2424- `Accept-Ranges`: A comma-separated list of fields upon which a range can be defined
@@ -127,7 +127,7 @@ defaultRange =
127127 getDefaultRange (Proxy @Color)
128128```
129129
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
131131of the class. Yet, you can define `getRangeOptions` to provide different parsing options (see
132132the last section of this guide). In the meantime, we've also defined a `defaultRange` as it will
133133come in handy when defining our handler.
@@ -148,7 +148,7 @@ type MyHeaders =
148148```
149149
150150`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:
152152
153153``` haskell
154154-- type MyHeaders =
@@ -165,7 +165,7 @@ not, _servant-pagination_ provides an easy way to lift a collection of resources
165165#### Server
166166
167167Time 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`
169169header, looking for the format defined in introduction with fields and target types we have just declared.
170170If no such header is provided, we will end up receiving `Nothing`. Otherwise, it will be possible
171171to _extract_ a `Range` from our `Ranges`.
@@ -192,7 +192,7 @@ the format we defined, where `<field>` here can only be `name` and `<value>` mus
192192- `Range: <field> [<value>][; offset <o>][; limit <l>][; order <asc|desc>]`
193193
194194Beside 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
196196following examples are valid requests to send to our server:
197197
198198- 1 - `curl http://localhost:1442/colors -vH 'Range: name'`
@@ -219,7 +219,7 @@ The previous ranges reads as follows:
219219Note that in the simple above scenario, there's no ambiguity with `extractRange` and `returnRange`
220220because there's only one possible `Range` defined on our resource. Yet, as you've most probably
221221noticed, 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
223223highly likely to be needed.
224224
225225
@@ -235,8 +235,8 @@ instance HasPagination Color "hex" where
235235#### Parsing Options
236236
237237By default, `servant-pagination` provides an implementation of `getRangeOptions` for each
238−`HasPagination` instance. However, this can be overwritten 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
238+`HasPagination` instance. However, this can be overridden when defining the instance to provide
239+your own options. These options come into play when a `Range` header is received and isn't fully
240240specified (`limit`, `offset`, `order` are all optional) to provide default fallback values for those.
241241
242242For 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
7979
8080- the Sentry `DSN`, which is obtained when creating a new project on Sentry
8181- 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
8383- a fallback handler, which we choose to be `silentFallback` since later we are logging to the console anyway.
8484
8585In 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
144144 :: m [a]
145145 -> (i -> m a)
146146 -> (a -> m NoContent)
147− -> Server (SimpleAPI name a i) m
147+ -> ServerT (SimpleAPI name a i) m
148148simpleAPIServer listAs getA postA =
149149 listAs :<|> getA :<|> postA
150150
doc/cookbook/using-custom-monad/UsingCustomMonad.lhs+1−1
@@ -1,6 +1,6 @@
11# Using a custom monad
22
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.
44We will keep state in memory and share it between requests using `Reader` monad and `STM`.
55
66We 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.
141141 Pure n ->
142142 putStrLn $ "Expected 1764, got " ++ show n
143143 _ ->
144− putStrLn "ERROR: didn't got a response"
144+ putStrLn "ERROR: didn't get a response"
145145```
146146
147147So 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
108108realm for this authentication is `"foo-realm"`).
109109
110110Unfortunately 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
112112usernames and passwords. This adds a certain conceptual wrinkle in servant's
113113design that we'll briefly discuss. If you want the **TL;DR**: we supply a lookup
114114function to servant's new `Context` primitive.
@@ -260,7 +260,7 @@ this.
260260
261261Let's implement a trivial authentication scheme. We will protect our API by
262262looking 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`.
264264
265265```haskell
266266-- | An account type that we "fetch from the database" after
@@ -274,7 +274,7 @@ database = fromList [ ("key1", Account "Anne Briggs")
274274 , ("key3", Account "Ghédalia Tazartès")
275275 ]
276276
277−-- | A method that, when given a password, will return a Account.
277+-- | A method that, when given a password, will return an Account.
278278-- This is our bespoke (and bad) authentication logic.
279279lookupAccount :: ByteString -> Handler Account
280280lookupAccount key = case Map.lookup key database of
@@ -346,7 +346,7 @@ genAuthServerContext = authHandler :. EmptyContext
346346
347347-- | Our API, where we provide all the author-supplied handlers for each end
348348-- 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,
350350-- that is taken care of by supplying context
351351genAuthServer :: Server AuthGenAPI
352352genAuthServer =
@@ -385,11 +385,11 @@ Creating a generalized, ad-hoc authentication scheme was fairly straight
385385forward:
386386
3873871. 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
389389authentication is successful (in our case this was `Account`).
3903903. Create a value of `AuthHandler Request Account` which encapsulates the
391391authentication 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.
3933934. Provide an instance of the `AuthServerData` type family, specifying your
394394application-specific data type returned when authentication is successful (in
395395our 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
161161## Changing the monad the client functions live in
162162
163163Just 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
165165in which _client functions_ live. Consider the following trivial API:
166166
167167``` haskell
@@ -173,7 +173,7 @@ hoistClientAPI = Proxy
173173
174174We already know how to derive client functions for this API, and as we have
175175seen 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
177177functions in. Sometimes we need to run them in IO, sometimes in a custom monad
178178stack. `hoistClient` is a very simple solution to the problem of "changing" the monad
179179the clients run in.
doc/tutorial/Docs.lhs+2−2
@@ -77,7 +77,7 @@ instance ToSample HelloMessage where
7777 [ ("When a value is provided for 'name'", HelloMessage "Hello, Alp")
7878 , ("When 'name' is not specified", HelloMessage "Hello, anonymous coward")
7979 ]
80− -- mutliple examples to display this time
80+ -- multiple examples to display this time
8181
8282ci :: ClientInfo
8383ci = ClientInfo "Alp" "alp@foo.com" 26 ["haskell", "mathematics"]
@@ -108,7 +108,7 @@ apiDocs = docs exampleAPI
108108markdown :: API -> String
109109```
110110
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`.
112112
113113````````` text
114114## GET /hello
doc/tutorial/Javascript.lhs+2−2
@@ -228,13 +228,13 @@ data CommonGeneratorOptions = CommonGeneratorOptions
228228 {
229229 -- | function generating function names
230230 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)
232232 , requestBody :: Text
233233 -- | name of the callback parameter when the request was successful
234234 , successCallback :: Text
235235 -- | name of the callback parameter when the request reported an error
236236 , 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)
238238 , moduleName :: Text
239239 -- | a prefix that should be prepended to the URL in the generated JS
240240 , urlPrefix :: Text
doc/tutorial/Server.lhs+5−5
@@ -183,7 +183,7 @@ users2 = [isaac, albert]
183183
184184Now, just like we separate the various endpoints in `UserAPI` with `:<|>`, we
185185are 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.
187187
188188``` haskell
189189server2 :: Server UserAPI2
@@ -716,7 +716,7 @@ $ curl --verbose http://localhost:8081/myfile.txt
716716>
717717< HTTP/1.1 404 Not Found
718718[snip]
719−myfile.txt just isnt there, please leave this server alone.
719+myfile.txt just isn't there, please leave this server alone.
720720
721721$ echo Hello > myfile.txt
722722
@@ -818,7 +818,7 @@ If it doesn't exist, the handler will fail with a `404` status code.
818818
819819`serveDirectoryWebApp` uses some standard settings that fit the use case of
820820serving 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.
822822
823823## Nested APIs
824824
@@ -1135,7 +1135,7 @@ true
11351135### An arrow is a reader too.
11361136
11371137In 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.
11391139
11401140One problematic situation was when the source monad was `(->) r`, yet it's
11411141handy 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
11661166a single content type, and also specify what framing strategy is used to
11671167delineate the results. To serve these results, we need to give back a stream
11681168producer. 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`
11701170stream type (it's simpler than *Pipes* or *Conduit*).
11711171The API of a streaming endpoint needs to explicitly specify which sort of
11721172generator it produces. Note that the generator itself is returned by a
servant-client-core/CHANGELOG.md+1−1
@@ -205,7 +205,7 @@
205205
206206- *servant-client-core* Add `hoistClient` to `HasClient`.
207207 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
209209 in which *client functions* live.
210210 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).
211211 ([#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
104104 , base-compat
105105 , servant-client-core
106106
107− -- Additonal dependencies
107+ -- Additional dependencies
108108 build-depends:
109109 deepseq >= 1.4.2.0 && < 1.5
110110 , hspec >= 2.6.0 && < 2.8
servant-client/CHANGELOG.md+1−1
@@ -198,7 +198,7 @@
198198
199199- *servant-client-core* Add `hoistClient` to `HasClient`.
200200 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
202202 in which *client functions* live.
203203 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).
204204 ([#936](https://github.com/haskell-servant/servant/pull/936))
servant-client/servant-client.cabal+1−1
@@ -120,7 +120,7 @@ test-suite spec
120120 , wai
121121 , warp
122122
123− -- Additonal dependencies
123+ -- Additional dependencies
124124 build-depends:
125125 entropy >= 0.4.1.3 && < 0.5
126126 , 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 =
130130-- streaming response types ('SourceT', 'Conduit', pipes 'Proxy' or 'Machine').
131131-- For those you have to use 'withClientM'.
132132--
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
134134-- connection is smaller. Use with care.
135135--
136136runClientM :: 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.
5757
5858This is some text
5959
60−### Second secton
60+### Second section
6161
6262And some more
6363
servant-docs/servant-docs.cabal+1−1
@@ -105,7 +105,7 @@ test-suite spec
105105 , servant-docs
106106 , string-conversions
107107
108− -- Additonal dependencies
108+ -- Additional dependencies
109109 build-depends:
110110 tasty >= 1.1.0.4 && < 1.3,
111111 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)
396396-- > extraInfo (Proxy :: Proxy ("greet" :> Capture "greetid" Text :> Delete)) $
397397-- > defAction & headers <>~ ["unicorns"]
398398-- > & notes <>~ [ DocNote "Title" ["This is some text"]
399−-- > , DocNote "Second secton" ["And some more"]
399+-- > , DocNote "Second section" ["And some more"]
400400-- > ]
401401
402402extraInfo :: (IsIn endpoint api, HasLink endpoint, HasDocs endpoint)
servant-foreign/servant-foreign.cabal+1−1
@@ -77,7 +77,7 @@ test-suite spec
7777 , servant
7878 , servant-foreign
7979
80− -- Additonal dependencies
80+ -- Additional dependencies
8181 build-depends:
8282 hspec >= 2.6.0 && <2.8
8383
servant-foreign/test/Servant/ForeignSpec.hs+1−1
@@ -114,7 +114,7 @@ listFromAPISpec = describe "listFromAPI" $ do
114114 shouldBe putReq $ defReq
115115 { _reqUrl = Url
116116 [ Segment $ Static "test" ]
117− -- Shoud this be |intX| or |listX of intX| ?
117+ -- Should this be |intX| or |listX of intX| ?
118118 [ QueryArg (Arg "params" "listX of intX") List ]
119119 , _reqMethod = "PUT"
120120 , _reqHeaders = []
servant-http-streams/servant-http-streams.cabal+1−1
@@ -114,7 +114,7 @@ test-suite spec
114114 , wai
115115 , warp
116116
117− -- Additonal dependencies
117+ -- Additional dependencies
118118 build-depends:
119119 entropy >= 0.4.1.3 && < 0.5
120120 , hspec >= 2.6.0 && < 2.8
servant-http-streams/test/Servant/ClientSpec.hs+3−3
@@ -77,7 +77,7 @@ _ = client comprehensiveAPIWithoutStreaming
7777
7878spec :: Spec
7979spec = describe "Servant.HttpStreams" $ do
80− sucessSpec
80+ successSpec
8181 failSpec
8282 wrappedApiSpec
8383 basicAuthSpec
@@ -262,8 +262,8 @@ runClientUnsafe x burl = withClientEnvIO burl (runClientMUnsafe x)
262262 where
263263 runClientMUnsafe x env = withClientM x env return
264264
265−sucessSpec :: Spec
266−sucessSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
265+successSpec :: Spec
266+successSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
267267 it "Servant.API.Get root" $ \(_, baseUrl) -> do
268268 left show <$> runClient getRoot baseUrl `shouldReturn` Right carol
269269
servant-server/CHANGELOG.md+2−2
@@ -35,7 +35,7 @@
3535 Some APIs need query parameters rewriting, e.g. in order to support
3636 for multiple casing (camel, snake, etc) or something to that effect.
3737
38− This could be easily achieved by using WAI Middleware and modyfing
38+ This could be easily achieved by using WAI Middleware and modifying
3939 request's `Query`. But QueryParam, QueryParams and QueryFlag use
4040 `rawQueryString`. By using `queryString` rather then `rawQueryString`
4141 we can enable such rewritings.
@@ -44,7 +44,7 @@
4444
4545 We used `build-type: Custom`, but it's problematic e.g.
4646 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).
4848
49490.16.2
5050------
servant-server/example/README.md+1−1
@@ -1,2 +1,2 @@
11- `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
155155 , transformers-compat
156156 , wai
157157
158− -- Additonal dependencies
158+ -- Additional dependencies
159159 build-depends:
160160 aeson >= 1.4.1.0 && < 1.5
161161 , 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
808808instance TypeError (HasServerArrowKindError arr) => HasServer ((arr :: k -> l) :> api) context
809809 where
810810 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
812812 route _ _ _ = error "servant-server panic: impossible happened in HasServer (arr :> api)"
813813 hoistServerWithContext _ _ _ = id
814814
servant-server/src/Servant/Server/Internal/BasicAuth.hs+1−1
@@ -32,7 +32,7 @@ import Servant.Server.Internal.ServerError
3232-- * Basic Auth
3333
3434-- | 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
3636-- a fixed amount of time.
3737
3838-- | The result of authentication/authorization
servant-server/src/Servant/Server/Internal/Context.hs+1−1
@@ -20,7 +20,7 @@ import GHC.TypeLits
2020--
2121-- If you are using combinators that require a non-empty 'Context' you have to
2222-- 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
2424-- list and accessing the elements is being done by type (see 'getContextEntry').
2525-- The parameter of the type 'Context' is a type-level list reflecting the types
2626-- 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 $
268268~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
269269
270270Due 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.
272272-}
servant-server/src/Servant/Server/Internal/DelayedIO.hs+1−1
@@ -24,7 +24,7 @@ import Servant.Server.Internal.ServerError
2424
2525-- | Computations used in a 'Delayed' can depend on the
2626-- 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
2828-- (with the possibility to recover), or fail fatally.
2929--
3030newtype DelayedIO a = DelayedIO { runDelayedIO' :: ReaderT Request (ResourceT (RouteResultT IO)) a }
servant/CHANGELOG.md+4−4
@@ -41,7 +41,7 @@
4141 Some APIs need query parameters rewriting, e.g. in order to support
4242 for multiple casing (camel, snake, etc) or something to that effect.
4343
44− This could be easily achieved by using WAI Middleware and modyfing
44+ This could be easily achieved by using WAI Middleware and modifying
4545 request's `Query`. But QueryParam, QueryParams and QueryFlag use
4646 `rawQueryString`. By using `queryString` rather then `rawQueryString`
4747 we can enable such rewritings.
@@ -50,7 +50,7 @@
5050
5151 We used `build-type: Custom`, but it's problematic e.g.
5252 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).
5454
5555- *servant* Remove deprecated modules [1268#](https://github.com/haskell-servant/servant/pull/1268)
5656
@@ -405,7 +405,7 @@
405405
406406- *servant-client-core* Add `hoistClient` to `HasClient`.
407407 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
409409 in which *client functions* live.
410410 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).
411411 ([#936](https://github.com/haskell-servant/servant/pull/936))
@@ -612,7 +612,7 @@
612612
613613 `enter` isn't exported from `Servant` module anymore. You can change
614614 `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`:
616616
617617 ```diff
618618 -server = enter (NT nt) impl
servant/servant.cabal+1−1
@@ -157,7 +157,7 @@ test-suite spec
157157 , text
158158 , transformers
159159
160− -- Additonal dependencies
160+ -- Additional dependencies
161161 build-depends:
162162 hspec >= 2.6.0 && < 2.8
163163 , 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
9595
9696class BuildHeadersTo hs where
9797 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,
9999 -- the values are interspersed with commas before deserialization (see
100100 -- <http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 RFC2616 Sec 4.2>)
101101
servant/src/Servant/Links.hs+3−3
@@ -54,7 +54,7 @@
5454-- >>> toUrlPiece $ safeLink api without
5555-- "bye"
5656--
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,
5858-- you can partially apply safeLink if you specify a correct type signature
5959-- like so:
6060--
@@ -65,7 +65,7 @@
6565-- >>> apiLink = safeLink api
6666-- >>> :}
6767--
68−-- `safeLink'` allows to make specialise the output:
68+-- `safeLink'` allows you to specialise the output:
6969--
7070-- >>> safeLink' toUrlPiece api without
7171-- "bye"
@@ -563,7 +563,7 @@ instance HasLink sub => HasLink (AuthProtect tag :> sub) where
563563 type MkLink (AuthProtect tag :> sub) a = MkLink sub a
564564 toLink = simpleToLink (Proxy :: Proxy sub)
565565
566−-- | Helper for implemneting 'toLink' for combinators not affecting link
566+-- | Helper for implementing 'toLink' for combinators not affecting link
567567-- structure.
568568simpleToLink
569569 :: forall sub a combinator.