git.iko.soy/typeable/servant
on master help sign in
Merge pull request #921 from manusajith/doc_patches
e02f29aAlp Mestanogullari
doc/cookbook/db-postgres-pool/PostgresPool.lhs+1−1
@@ -61,7 +61,7 @@ to flexibly set up a whole bunch of PostgreSQL connections tailored to our
61needs and then to forget about it all by simply asking for a connection
61needs and then to forget about it all by simply asking for a connection
62using `withResource`.
62using `withResource`.
63
63
64−The handlers are straighforward. One takes care of inserting a new
64+The handlers are straightforward. One takes care of inserting a new
65value in the database while the other fetches all messages and returns
65value in the database while the other fetches all messages and returns
66them. We also provide a function for serving our web app given a PostgreSQL
66them. We also provide a function for serving our web app given a PostgreSQL
67connection pool, which simply calls servant-server's `serve` function.
67connection pool, which simply calls servant-server's `serve` function.
doc/cookbook/db-sqlite-simple/DBConnection.lhs+2−2
@@ -42,9 +42,9 @@ initDB dbfile = withConnection dbfile $ \conn ->
42 "CREATE TABLE IF NOT EXISTS messages (msg text not null)"
42 "CREATE TABLE IF NOT EXISTS messages (msg text not null)"
43```
43```
44
44
45−Next, our server implementation. It will be parametrised (take as
45+Next, our server implementation. It will be parametrised (take as an
46argument) by the name of the file that contains our SQLite database.
46argument) by the name of the file that contains our SQLite database.
47−The handlers are straighforward. One takes care of inserting a new
47+The handlers are straightforward. One takes care of inserting a new
48value in the database while the other fetches all messages and returns
48value in the database while the other fetches all messages and returns
49them. We also provide a function for serving our web app given an
49them. We also provide a function for serving our web app given an
50SQLite database file, which simply calls servant-server's `serve` function.
50SQLite database file, which simply calls servant-server's `serve` function.
doc/cookbook/file-upload/FileUpload.lhs+1−1
@@ -48,7 +48,7 @@ dedicated `ReqBody`-like combinator named
48This combinator takes two parameters. The first one is the
48This combinator takes two parameters. The first one is the
49"backend" to use. Currently, you only have the choice between
49"backend" to use. Currently, you only have the choice between
50`Mem` and `Tmp`. The former loads the entire input in memory,
50`Mem` and `Tmp`. The former loads the entire input in memory,
51−even the uploadedd files, while `Tmp` will stream uploaded
51+even the uploaded files, while `Tmp` will stream uploaded
52files to some temporary directory.
52files to some temporary directory.
53
53
54The second parameter is the type you want the multipart data
54The second parameter is the type you want the multipart data
doc/tutorial/ApiType.lhs+1−1
@@ -137,7 +137,7 @@ type StreamGet = Stream 'GET
137type StreamPost = Stream 'POST
137type StreamPost = Stream 'POST
138```
138```
139
139
140−These describe endpoints that return a stream of values rather than just a single value. They not only take a single content type as a parameter, but also a framing strategy -- this specifies how the individual results are deliniated from one another in the stream. The two standard strategies given with Servant are `NewlineFraming` and `NetstringFraming`, but others can be written to match other protocols.
140+These describe endpoints that return a stream of values rather than just a single value. They not only take a single content type as a parameter, but also a framing strategy -- this specifies how the individual results are delineated from one another in the stream. The two standard strategies given with Servant are `NewlineFraming` and `NetstringFraming`, but others can be written to match other protocols.
141
141
142
142
143### `Capture`
143### `Capture`