Skip to content

Commit 64686f3

Browse files
author
Sasa Bogicevic
committed
Merge branch 'master' into 309-handle-application-exceptions-with-500-errors
2 parents 3d9a151 + 3525963 commit 64686f3

File tree

34 files changed

+405
-249
lines changed

34 files changed

+405
-249
lines changed

.travis.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' '--max-backjumps=10000' 'cabal.project'
3+
# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' 'cabal.project'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -33,18 +33,21 @@ before_cache:
3333

3434
matrix:
3535
include:
36-
- compiler: "ghc-7.8.4"
36+
- compiler: "ghc-8.4.3"
3737
# env: TEST=--disable-tests BENCH=--disable-benchmarks
38-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
39-
- compiler: "ghc-7.10.3"
38+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.4.3], sources: [hvr-ghc]}}
39+
- compiler: "ghc-8.2.2"
4040
# env: TEST=--disable-tests BENCH=--disable-benchmarks
41-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
41+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.2.2], sources: [hvr-ghc]}}
4242
- compiler: "ghc-8.0.2"
4343
# env: TEST=--disable-tests BENCH=--disable-benchmarks
44-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
45-
- compiler: "ghc-8.2.2"
44+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.0.2], sources: [hvr-ghc]}}
45+
- compiler: "ghc-7.10.3"
4646
# env: TEST=--disable-tests BENCH=--disable-benchmarks
47-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
47+
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.10.3], sources: [hvr-ghc]}}
48+
- compiler: "ghc-7.8.4"
49+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
50+
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.8.4], sources: [hvr-ghc]}}
4851

4952
before_install:
5053
- HC=${CC}
@@ -56,6 +59,17 @@ before_install:
5659
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
5760
- echo $HCNUMVER
5861

62+
# Let's download "better" cabal
63+
- "curl -L http://oleg.fi/cabal-grayjay-buildable-fix.xz | xz -d > $HOME/.local/bin/cabal"
64+
- |
65+
if [ "$(cd $HOME/.local/bin && sha256sum cabal)" != "e281e9466b8eef30ac0d1371e8ea83c9d2e856bda4714a728ac474138b09b20f cabal" ]; then
66+
rm -f $HOME/.local/bin/cabal;
67+
sha256sum $HOME/.local/bin/cabal;
68+
false;
69+
else
70+
chmod a+x $HOME/.local/bin/cabal;
71+
fi
72+
5973
install:
6074
- cabal --version
6175
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
@@ -64,15 +78,14 @@ install:
6478
- HADDOCK=${HADDOCK-true}
6579
- INSTALLED=${INSTALLED-true}
6680
- GHCHEAD=${GHCHEAD-false}
67-
- CABALNEWBUILDOPTS=--max-backjumps=10000
6881
- travis_retry cabal update -v
6982
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
7083
- rm -fv cabal.project cabal.project.local
7184
- "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
7285
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
73-
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/basic-auth\" \"doc/cookbook/https\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/file-upload\"\\n' > cabal.project"
86+
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/basic-auth\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/https\" \"doc/cookbook/pagination\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\"\\n' > cabal.project"
7487
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
75-
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
88+
- "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base' >> cabal.project"
7689
- cat cabal.project
7790
- if [ -f "servant/configure.ac" ]; then
7891
(cd "servant" && autoreconf -i);
@@ -95,32 +108,29 @@ install:
95108
- if [ -f "doc/tutorial/configure.ac" ]; then
96109
(cd "doc/tutorial" && autoreconf -i);
97110
fi
111+
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
112+
(cd "doc/cookbook/basic-auth" && autoreconf -i);
113+
fi
98114
- if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then
99115
(cd "doc/cookbook/db-postgres-pool" && autoreconf -i);
100116
fi
101-
- if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
102-
(cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
103-
fi
104117
- if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
105118
(cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
106119
fi
107-
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
108-
(cd "doc/cookbook/basic-auth" && autoreconf -i);
109-
fi
110120
- if [ -f "doc/cookbook/https/configure.ac" ]; then
111121
(cd "doc/cookbook/https" && autoreconf -i);
112122
fi
123+
- if [ -f "doc/cookbook/pagination/configure.ac" ]; then
124+
(cd "doc/cookbook/pagination" && autoreconf -i);
125+
fi
113126
- if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then
114127
(cd "doc/cookbook/structuring-apis" && autoreconf -i);
115128
fi
116129
- if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then
117130
(cd "doc/cookbook/using-custom-monad" && autoreconf -i);
118131
fi
119-
- if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
120-
(cd "doc/cookbook/file-upload" && autoreconf -i);
121-
fi
122132
- rm -f cabal.project.freeze
123-
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/https"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/file-upload"/dist
133+
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/https"/dist "doc/cookbook/pagination"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist
124134
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
125135

126136
# Here starts the actual work to be performed for the package under test;
@@ -135,37 +145,36 @@ script:
135145
- (cd "servant-foreign" && cabal sdist)
136146
- (cd "servant-server" && cabal sdist)
137147
- (cd "doc/tutorial" && cabal sdist)
148+
- (cd "doc/cookbook/basic-auth" && cabal sdist)
138149
- (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
139-
- (cd "doc/cookbook/jwt-and-basic-auth" && cabal sdist)
140150
- (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
141-
- (cd "doc/cookbook/basic-auth" && cabal sdist)
142151
- (cd "doc/cookbook/https" && cabal sdist)
152+
- (cd "doc/cookbook/pagination" && cabal sdist)
143153
- (cd "doc/cookbook/structuring-apis" && cabal sdist)
144154
- (cd "doc/cookbook/using-custom-monad" && cabal sdist)
145-
- (cd "doc/cookbook/file-upload" && cabal sdist)
146155
- echo -en 'travis_fold:end:sdist\\r'
147156
- echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
148-
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/jwt-and-basic-auth"/dist/cookbook-jwt-and-basic-auth-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz ${DISTDIR}/
157+
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/pagination"/dist/cookbook-pagination-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz ${DISTDIR}/
149158
- cd ${DISTDIR} || false
150159
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
151-
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-https-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-file-upload-*/*.cabal\\n' > cabal.project"
160+
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-https-*/*.cabal cookbook-pagination-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal\\n' > cabal.project"
152161
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
153-
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
162+
- "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base' >> cabal.project"
154163
- cat cabal.project
155164
- echo -en 'travis_fold:end:unpack\\r'
156165

157166

158167
- echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
159168
# build & run tests, build benchmarks
160-
- cabal new-build -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all
169+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
161170
- echo -en 'travis_fold:end:build-everything\\r'
162-
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all; fi
171+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
163172

164173
- echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
165174
# haddock
166175
- rm -rf ./dist-newstyle
167-
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all; else echo "Skipping haddock generation";fi
176+
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
168177

169178
- echo -en 'travis_fold:end:haddock\\r'
170-
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","--max-backjumps=10000","cabal.project"]
179+
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
171180
# EOF

cabal.project

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,29 @@ packages: servant/
55
servant-foreign/
66
servant-server/
77
doc/tutorial/
8-
doc/cookbook/*/*.cabal
8+
9+
-- doc/cookbook/*/*.cabal
10+
11+
doc/cookbook/basic-auth
12+
doc/cookbook/db-postgres-pool
13+
doc/cookbook/db-sqlite-simple
14+
-- MkLink changed
15+
-- doc/cookbook/file-upload
16+
doc/cookbook/https
17+
-- servant-auth-* doesn't support GHC-8.4
18+
-- doc/cookbook/jwt-and-basic-auth
19+
doc/cookbook/pagination
20+
doc/cookbook/structuring-apis
21+
doc/cookbook/using-custom-monad
922

1023
allow-newer:
11-
servant-js:servant,
12-
servant-js:servant-foreign,
1324
servant-auth-server:http-types,
14-
servant-multipart:lens,
15-
servant-multipart:resourcet,
16-
servant-multipart:servant,
17-
servant-multipart:servant-server,
1825
servant-auth-server:servant-server
1926

2027
constraints:
2128
-- see https://github.com/haskell-infra/hackage-trustees/issues/119
2229
foundation >=0.0.14,
2330
memory <0.14.12 || >0.14.12
31+
32+
allow-newer:
33+
http-media:base

doc/cookbook/basic-auth/basic-auth.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-basic-auth
1414
main-is: BasicAuth.lhs

doc/cookbook/db-postgres-pool/db-postgres-pool.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-db-postgres-pool
1414
main-is: PostgresPool.lhs

doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-db-sqlite-simple
1414
main-is: DBConnection.lhs

doc/cookbook/file-upload/file-upload.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-file-upload
1414
main-is: FileUpload.lhs

doc/cookbook/https/https.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-https
1414
main-is: Https.lhs

doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainer: [email protected]
1111
category: Servant
1212
build-type: Simple
1313
cabal-version: >=1.10
14-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
14+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1515

1616
executable cookbook-jwt-and-basic-auth
1717
if !impl(ghc >= 7.10)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```haskell
2+
module Main (main) where
3+
main :: IO ()
4+
main = return ()
5+
```

doc/cookbook/pagination/pagination.cabal

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11+
extra-source-files:
12+
Pagination.lhs
13+
dummy/Pagination.lhs
14+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1115

1216
executable cookbook-pagination
13-
if impl(ghc < 7.10.1)
14-
buildable: False
1517
main-is: Pagination.lhs
16-
build-depends: base == 4.*
17-
, aeson
18-
, servant
19-
, servant-server
20-
, servant-pagination >= 2.1.0 && < 3.0.0
21-
, warp
18+
build-tool-depends: markdown-unlit:markdown-unlit
2219
default-language: Haskell2010
2320
ghc-options: -Wall -pgmL markdown-unlit
24-
build-tool-depends: markdown-unlit:markdown-unlit
21+
22+
if impl(ghc >= 8.0)
23+
hs-source-dirs: .
24+
build-depends: base >= 4.8 && <4.12
25+
, aeson
26+
, servant
27+
, servant-server
28+
, servant-pagination >= 2.1.0 && < 3.0.0
29+
, warp
30+
else
31+
hs-source-dirs: dummy
32+
build-depends: base

doc/cookbook/structuring-apis/structuring-apis.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-structuring-apis
1414
main-is: StructuringApis.lhs

doc/cookbook/using-custom-monad/using-custom-monad.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
1212

1313
executable cookbook-using-custom-monad
1414
main-is: UsingCustomMonad.lhs

doc/examples.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
including a test-suite using [**hspec**](http://hspec.github.io/) and
77
**servant-client**.
88

9+
- **[servant-examples](https://github.com/sras/servant-examples)**:
10+
11+
Similar to [the cookbook](https://haskell-servant.readthedocs.io/en/latest/cookbook/index.html) but
12+
with no explanations, for developers who just want to look at code examples to find out how to do X or Y
13+
with servant.
914

1015
- **[stack-templates](https://github.com/commercialhaskell/stack-templates)**
1116

doc/tutorial/ApiType.lhs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type StreamGet = Stream 'GET
137137
type StreamPost = Stream 'POST
138138
```
139139
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.
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 three standard strategies given with Servant are `NewlineFraming`, `NetstringFraming` and `NoFraming`, but others can be written to match other protocols.
141141
142142
143143
### `Capture`

doc/tutorial/Server.lhs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ users1 =
9595
]
9696
```
9797
98-
Let's also write our API type.
99-
100-
``` haskell ignore
101-
type UserAPI1 = "users" :> Get '[JSON] [User]
102-
```
103-
10498
We can now take care of writing the actual webservice that will handle requests
10599
to such an API. This one will be very simple, being reduced to just a single
106100
endpoint. The type of the web application is determined by the API type,

doc/tutorial/tutorial.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ tested-with:
1717
GHC==7.10.3
1818
GHC==8.0.2
1919
GHC==8.2.2
20+
GHC==8.4.3
2021
extra-source-files:
2122
static/index.html
2223
static/ui.js
@@ -34,7 +35,7 @@ library
3435
-- Packages `servant` depends on.
3536
-- We don't need to specify bounds here as this package is never released.
3637
build-depends:
37-
base >= 4.7 && <4.11
38+
base >= 4.7 && <4.12
3839
, aeson
3940
, aeson-compat
4041
, attoparsec

servant-client-core/servant-client-core.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tested-with:
2323
GHC==7.10.3
2424
GHC==8.0.2
2525
GHC==8.2.2
26+
GHC==8.4.3
2627

2728
source-repository head
2829
type: git
@@ -47,7 +48,7 @@ library
4748
--
4849
-- note: mtl lower bound is so low because of GHC-7.8
4950
build-depends:
50-
base >= 4.7 && < 4.11
51+
base >= 4.7 && < 4.12
5152
, bytestring >= 0.10.4.0 && < 0.11
5253
, containers >= 0.5.5.1 && < 0.6
5354
, mtl >= 2.1 && < 2.3

0 commit comments

Comments
 (0)