git.iko.soy/typeable/servant
on 759b85a help sign in
36 files changed+476−214
since splitsnapshots
unifiedsplit
.travis.yml+242−123 cabal.haskell-ci+9−1 cabal.project+43−5 doc/cookbook/basic-auth/basic-auth.cabal+1−1 doc/cookbook/basic-streaming/basic-streaming.cabal+2−2 doc/cookbook/curl-mock/curl-mock.cabal+1−1 doc/cookbook/db-postgres-pool/db-postgres-pool.cabal+1−1 doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal+1−1 doc/cookbook/file-upload/file-upload.cabal+1−1 doc/cookbook/generic/generic.cabal+1−1 doc/cookbook/hoist-server-with-context/hoist-server-with-context.cabal+1−1 doc/cookbook/https/https.cabal+1−1 doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal+1−1 doc/cookbook/pagination/pagination.cabal+1−1 doc/cookbook/sentry/sentry.cabal+1−1 doc/cookbook/structuring-apis/structuring-apis.cabal+1−1 doc/cookbook/testing/testing.cabal+1−1 doc/cookbook/using-custom-monad/using-custom-monad.cabal+1−1 doc/cookbook/using-free-client/using-free-client.cabal+1−1 doc/tutorial/tutorial.cabal+4−3 servant-client-core/servant-client-core.cabal+8−6 servant-client-ghcjs/servant-client-ghcjs.cabal+1−1 servant-client/servant-client.cabal+9−7 servant-conduit/servant-conduit.cabal+3−2 servant-docs/servant-docs.cabal+8−7 servant-foreign/servant-foreign.cabal+5−4 servant-http-streams/servant-http-streams.cabal+9−7 servant-machines/servant-machines.cabal+5−4 servant-pipes/servant-pipes.cabal+3−2 servant-pipes/src/Servant/Pipes.hs+1−1 servant-server/CHANGELOG.md+14 servant-server/servant-server.cabal+11−10 servant/CHANGELOG.md+23 servant/servant.cabal+11−9 servant/src/Servant/Types/SourceT.hs+32 servant/test/Servant/API/ContentTypesSpec.hs+18−5
.travis.yml+242−123
@@ -4,23 +4,21 @@
44#
55# For more information, see https://github.com/haskell-CI/haskell-ci
66#
7−# version: 0.2.1
7+# version: 0.5.20190908
88#
99language: c
1010dist: xenial
11−
1211git:
13− submodules: false # whether to recursively clone submodules
14−
12+ # whether to recursively clone submodules
13+ submodules: false
1514branches:
1615 only:
1716 - master
18−
17+ - release-0.16
1918cache:
2019 directories:
2120 - $HOME/.cabal/packages
2221 - $HOME/.cabal/store
23−
2422before_cache:
2523 - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2624 # remove files that are regenerated by 'cabal update'
@@ -29,79 +27,152 @@ before_cache:
2927 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
3028 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
3129 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
32−
3330 - rm -rfv $CABALHOME/packages/head.hackage
34−
3531matrix:
3632 include:
37− - compiler: "ghc-8.6.4"
38− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}}
39− - compiler: "ghc-8.4.4"
40− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
41− - compiler: "ghc-8.2.2"
42− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
43− - compiler: "ghc-8.0.2"
44− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
45−
33+ - compiler: ghc-8.8.1
34+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
35+ - compiler: ghc-8.6.5
36+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
37+ - compiler: ghc-8.4.4
38+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
39+ - compiler: ghc-8.2.2
40+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
41+ - compiler: ghc-8.0.2
42+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
43+ allow_failures:
44+ - compiler: ghc-8.8.1
4645before_install:
47− - HC=/opt/ghc/bin/${CC}
48− - HCPKG=${HC/ghc/ghc-pkg}
46+ - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
47+ - WITHCOMPILER="-w $HC"
48+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
49+ - HCPKG="$HC-pkg"
4950 - unset CC
5051 - CABAL=/opt/ghc/bin/cabal
5152 - CABALHOME=$HOME/.cabal
5253 - export PATH="$CABALHOME/bin:$PATH"
53− - ROOTDIR=$(pwd)
54− - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
54+ - TOP=$(pwd)
55+ - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
5556 - echo $HCNUMVER
56−
57+ - CABAL="$CABAL -vnormal+nowrap+markoutput"
58+ - set -o pipefail
59+ - |
60+ echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
61+ echo 'BEGIN { state = "output"; }' >> .colorful.awk
62+ echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
63+ echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
64+ echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
65+ echo ' if (state == "cabal") {' >> .colorful.awk
66+ echo ' print blue($0)' >> .colorful.awk
67+ echo ' } else {' >> .colorful.awk
68+ echo ' print $0' >> .colorful.awk
69+ echo ' }' >> .colorful.awk
70+ echo '}' >> .colorful.awk
71+ - cat .colorful.awk
72+ - |
73+ color_cabal_output () {
74+ awk -f $TOP/.colorful.awk
75+ }
76+ - echo text | color_cabal_output
5777install:
5878 - ${CABAL} --version
5979 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
6080 - TEST=--enable-tests
6181 - BENCH=--enable-benchmarks
62− - GHCHEAD=${GHCHEAD-false}
63− - travis_retry ${CABAL} update -v
64− - sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
65− - rm -fv cabal.project cabal.project.local
66− - "sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' $CABALHOME/config"
67− - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
68− - rm -f cabal.project
82+ - HEADHACKAGE=false
83+ - if [ $HCNUMVER -ge 80800 ] ; then HEADHACKAGE=true ; fi
84+ - rm -f $CABALHOME/config
85+ - |
86+ echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
87+ echo "remote-build-reporting: anonymous" >> $CABALHOME/config
88+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
89+ echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
90+ echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
91+ echo "world-file: $CABALHOME/world" >> $CABALHOME/config
92+ echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
93+ echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
94+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
95+ echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
96+ echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
97+ echo "install-dirs user" >> $CABALHOME/config
98+ echo " prefix: $CABALHOME" >> $CABALHOME/config
99+ echo "repository hackage.haskell.org" >> $CABALHOME/config
100+ echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
101+ - |
102+ if $HEADHACKAGE; then
103+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config
104+ echo "repository head.hackage.ghc.haskell.org" >> $CABALHOME/config
105+ echo " url: https://ghc.gitlab.haskell.org/head.hackage/" >> $CABALHOME/config
106+ echo " secure: True" >> $CABALHOME/config
107+ echo " root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d" >> $CABALHOME/config
108+ echo " 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329" >> $CABALHOME/config
109+ echo " f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89" >> $CABALHOME/config
110+ echo " key-threshold: 3" >> $CABALHOME/config
111+ fi
112+ - GHCJOBS=-j2
113+ - |
114+ echo "program-default-options" >> $CABALHOME/config
115+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
116+ - cat $CABALHOME/config
117+ - rm -fv cabal.project cabal.project.local cabal.project.freeze
118+ - travis_retry ${CABAL} v2-update -v
119+ # Generate cabal.project
120+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
69121 - touch cabal.project
70− - "printf 'packages: \"servant\"\\n' >> cabal.project"
71− - "printf 'packages: \"servant-client\"\\n' >> cabal.project"
72− - "printf 'packages: \"servant-client-core\"\\n' >> cabal.project"
73− - "printf 'packages: \"servant-http-streams\"\\n' >> cabal.project"
74− - "printf 'packages: \"servant-docs\"\\n' >> cabal.project"
75− - "printf 'packages: \"servant-foreign\"\\n' >> cabal.project"
76− - "printf 'packages: \"servant-server\"\\n' >> cabal.project"
77− - "printf 'packages: \"doc/tutorial\"\\n' >> cabal.project"
78− - "printf 'packages: \"servant-machines\"\\n' >> cabal.project"
79− - "printf 'packages: \"servant-conduit\"\\n' >> cabal.project"
80− - "printf 'packages: \"servant-pipes\"\\n' >> cabal.project"
81− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/basic-auth\"\\n' >> cabal.project ; fi"
82− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/curl-mock\"\\n' >> cabal.project ; fi"
83− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/basic-streaming\"\\n' >> cabal.project ; fi"
84− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/db-postgres-pool\"\\n' >> cabal.project ; fi"
85− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/db-sqlite-simple\"\\n' >> cabal.project ; fi"
86− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/file-upload\"\\n' >> cabal.project ; fi"
87− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/generic\"\\n' >> cabal.project ; fi"
88− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/https\"\\n' >> cabal.project ; fi"
89− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/pagination\"\\n' >> cabal.project ; fi"
90− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/testing\"\\n' >> cabal.project ; fi"
91− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/structuring-apis\"\\n' >> cabal.project ; fi"
92− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/using-custom-monad\"\\n' >> cabal.project ; fi"
93− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"doc/cookbook/using-free-client\"\\n' >> cabal.project ; fi"
94− - "echo 'constraints: foundation >=0.0.14' >> cabal.project"
95− - "echo 'constraints: memory <0.14.12 || >0.14.12' >> cabal.project"
96− - "echo 'allow-newer: servant-quickcheck:servant' >> cabal.project"
97− - "echo 'allow-newer: servant-quickcheck:servant-client' >> cabal.project"
98− - "echo 'allow-newer: servant-quickcheck:servant-server' >> cabal.project"
99− - "echo 'allow-newer: servant-quickcheck:hspec' >> cabal.project"
100− - "echo 'allow-newer: servant-quickcheck:http-client' >> cabal.project"
101− - "echo 'optimization: False' >> cabal.project "
102− - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
103− - touch cabal.project.local
104− - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
122+ - |
123+ echo "packages: servant" >> cabal.project
124+ echo "packages: servant-client" >> cabal.project
125+ echo "packages: servant-client-core" >> cabal.project
126+ echo "packages: servant-http-streams" >> cabal.project
127+ echo "packages: servant-docs" >> cabal.project
128+ echo "packages: servant-foreign" >> cabal.project
129+ echo "packages: servant-server" >> cabal.project
130+ echo "packages: doc/tutorial" >> cabal.project
131+ echo "packages: servant-machines" >> cabal.project
132+ echo "packages: servant-conduit" >> cabal.project
133+ echo "packages: servant-pipes" >> cabal.project
134+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-auth" >> cabal.project ; fi
135+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/curl-mock" >> cabal.project ; fi
136+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-streaming" >> cabal.project ; fi
137+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/db-postgres-pool" >> cabal.project ; fi
138+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/file-upload" >> cabal.project ; fi
139+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/generic" >> cabal.project ; fi
140+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/testing" >> cabal.project ; fi
141+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/structuring-apis" >> cabal.project ; fi
142+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/using-custom-monad" >> cabal.project ; fi
143+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/using-free-client" >> cabal.project ; fi
144+ - |
145+ echo "constraints: foundation >=0.0.14" >> cabal.project
146+ echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
147+ echo "constraints: sqlite-simple < 0" >> cabal.project
148+ echo "allow-newer: servant-multipart:http-media" >> cabal.project
149+ echo "allow-newer: servant-multipart:lens" >> cabal.project
150+ echo "allow-newer: servant-js:base" >> cabal.project
151+ echo "allow-newer: servant-js:lens" >> cabal.project
152+ echo "allow-newer: servant-quickcheck:base" >> cabal.project
153+ echo "allow-newer: servant-quickcheck:hspec" >> cabal.project
154+ echo "allow-newer: servant-quickcheck:http-client" >> cabal.project
155+ echo "allow-newer: servant-quickcheck:http-media" >> cabal.project
156+ echo "allow-newer: servant-quickcheck:QuickCheck" >> cabal.project
157+ echo "allow-newer: servant-quickcheck:servant" >> cabal.project
158+ echo "allow-newer: servant-quickcheck:servant-client" >> cabal.project
159+ echo "allow-newer: servant-quickcheck:servant-server" >> cabal.project
160+ echo "allow-newer: servant-quickcheck:time" >> cabal.project
161+ echo "allow-newer: servant-quickcheck:warp" >> cabal.project
162+ echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
163+ echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
164+ echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
165+ echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
166+ echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
167+ echo "allow-newer: io-streams:primitive" >> cabal.project
168+ echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
169+ echo "optimization: False" >> cabal.project
170+ echo "" >> cabal.project
171+ echo "source-repository-package" >> cabal.project
172+ echo " type: git" >> cabal.project
173+ echo " location: https://github.com/luqui/control-monad-omega.git" >> cabal.project
174+ echo " tag: 76c71e8917eec275ba423959f00a34583b5c7215" >> cabal.project
175+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
105176 - cat cabal.project || true
106177 - cat cabal.project.local || true
107178 - if [ -f "servant/configure.ac" ]; then (cd "servant" && autoreconf -i); fi
@@ -119,81 +190,129 @@ install:
119190 - if [ -f "doc/cookbook/curl-mock/configure.ac" ]; then (cd "doc/cookbook/curl-mock" && autoreconf -i); fi
120191 - if [ -f "doc/cookbook/basic-streaming/configure.ac" ]; then (cd "doc/cookbook/basic-streaming" && autoreconf -i); fi
121192 - if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then (cd "doc/cookbook/db-postgres-pool" && autoreconf -i); fi
122− - if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i); fi
123193 - if [ -f "doc/cookbook/file-upload/configure.ac" ]; then (cd "doc/cookbook/file-upload" && autoreconf -i); fi
124194 - if [ -f "doc/cookbook/generic/configure.ac" ]; then (cd "doc/cookbook/generic" && autoreconf -i); fi
125− - if [ -f "doc/cookbook/https/configure.ac" ]; then (cd "doc/cookbook/https" && autoreconf -i); fi
126− - if [ -f "doc/cookbook/pagination/configure.ac" ]; then (cd "doc/cookbook/pagination" && autoreconf -i); fi
127195 - if [ -f "doc/cookbook/testing/configure.ac" ]; then (cd "doc/cookbook/testing" && autoreconf -i); fi
128196 - if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then (cd "doc/cookbook/structuring-apis" && autoreconf -i); fi
129197 - if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then (cd "doc/cookbook/using-custom-monad" && autoreconf -i); fi
130198 - if [ -f "doc/cookbook/using-free-client/configure.ac" ]; then (cd "doc/cookbook/using-free-client" && autoreconf -i); fi
131− - rm -f cabal.project.freeze
132− - rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-http-streams"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "servant-machines"/dist "servant-conduit"/dist "servant-pipes"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/curl-mock"/dist "doc/cookbook/basic-streaming"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/file-upload"/dist "doc/cookbook/generic"/dist "doc/cookbook/https"/dist "doc/cookbook/pagination"/dist "doc/cookbook/testing"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/using-free-client"/dist
133− - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
134−
135−# Here starts the actual work to be performed for the package under test;
136−# any command which exits with a non-zero exit code causes the build to fail.
199+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
200+ - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
201+ - rm cabal.project.freeze
137202script:
138− # test that source-distributions can be generated
139− - echo Packaging... && echo -en 'travis_fold:start:sdist\\r'
140− - ${CABAL} new-sdist all
203+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
204+ # Packaging...
205+ - echo 'Packaging...' && echo -en 'travis_fold:start:sdist\\r'
206+ - ${CABAL} v2-sdist all | color_cabal_output
141207 - echo -en 'travis_fold:end:sdist\\r'
142− - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
208+ # Unpacking...
209+ - echo 'Unpacking...' && echo -en 'travis_fold:start:unpack\\r'
143210 - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
144211 - cd ${DISTDIR} || false
145− - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
146− - rm -f cabal.project
212+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
213+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
214+ - PKGDIR_servant="$(find . -maxdepth 1 -type d -regex '.*/servant-[0-9.]*')"
215+ - PKGDIR_servant_client="$(find . -maxdepth 1 -type d -regex '.*/servant-client-[0-9.]*')"
216+ - PKGDIR_servant_client_core="$(find . -maxdepth 1 -type d -regex '.*/servant-client-core-[0-9.]*')"
217+ - PKGDIR_servant_http_streams="$(find . -maxdepth 1 -type d -regex '.*/servant-http-streams-[0-9.]*')"
218+ - PKGDIR_servant_docs="$(find . -maxdepth 1 -type d -regex '.*/servant-docs-[0-9.]*')"
219+ - PKGDIR_servant_foreign="$(find . -maxdepth 1 -type d -regex '.*/servant-foreign-[0-9.]*')"
220+ - PKGDIR_servant_server="$(find . -maxdepth 1 -type d -regex '.*/servant-server-[0-9.]*')"
221+ - PKGDIR_tutorial="$(find . -maxdepth 1 -type d -regex '.*/tutorial-[0-9.]*')"
222+ - PKGDIR_servant_machines="$(find . -maxdepth 1 -type d -regex '.*/servant-machines-[0-9.]*')"
223+ - PKGDIR_servant_conduit="$(find . -maxdepth 1 -type d -regex '.*/servant-conduit-[0-9.]*')"
224+ - PKGDIR_servant_pipes="$(find . -maxdepth 1 -type d -regex '.*/servant-pipes-[0-9.]*')"
225+ - PKGDIR_cookbook_basic_auth="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-auth-[0-9.]*')"
226+ - PKGDIR_cookbook_curl_mock="$(find . -maxdepth 1 -type d -regex '.*/cookbook-curl-mock-[0-9.]*')"
227+ - PKGDIR_cookbook_basic_streaming="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-streaming-[0-9.]*')"
228+ - PKGDIR_cookbook_db_postgres_pool="$(find . -maxdepth 1 -type d -regex '.*/cookbook-db-postgres-pool-[0-9.]*')"
229+ - PKGDIR_cookbook_file_upload="$(find . -maxdepth 1 -type d -regex '.*/cookbook-file-upload-[0-9.]*')"
230+ - PKGDIR_cookbook_generic="$(find . -maxdepth 1 -type d -regex '.*/cookbook-generic-[0-9.]*')"
231+ - PKGDIR_cookbook_testing="$(find . -maxdepth 1 -type d -regex '.*/cookbook-testing-[0-9.]*')"
232+ - PKGDIR_cookbook_structuring_apis="$(find . -maxdepth 1 -type d -regex '.*/cookbook-structuring-apis-[0-9.]*')"
233+ - PKGDIR_cookbook_using_custom_monad="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-custom-monad-[0-9.]*')"
234+ - PKGDIR_cookbook_using_free_client="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-free-client-[0-9.]*')"
235+ # Generate cabal.project
236+ - rm -rf cabal.project cabal.project.local cabal.project.freeze
147237 - touch cabal.project
148− - "printf 'packages: \"servant-*/*.cabal\"\\n' >> cabal.project"
149− - "printf 'packages: \"servant-client-*/*.cabal\"\\n' >> cabal.project"
150− - "printf 'packages: \"servant-client-core-*/*.cabal\"\\n' >> cabal.project"
151− - "printf 'packages: \"servant-http-streams-*/*.cabal\"\\n' >> cabal.project"
152− - "printf 'packages: \"servant-docs-*/*.cabal\"\\n' >> cabal.project"
153− - "printf 'packages: \"servant-foreign-*/*.cabal\"\\n' >> cabal.project"
154− - "printf 'packages: \"servant-server-*/*.cabal\"\\n' >> cabal.project"
155− - "printf 'packages: \"tutorial-*/*.cabal\"\\n' >> cabal.project"
156− - "printf 'packages: \"servant-machines-*/*.cabal\"\\n' >> cabal.project"
157− - "printf 'packages: \"servant-conduit-*/*.cabal\"\\n' >> cabal.project"
158− - "printf 'packages: \"servant-pipes-*/*.cabal\"\\n' >> cabal.project"
159− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-basic-auth-*/*.cabal\"\\n' >> cabal.project ; fi"
160− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-curl-mock-*/*.cabal\"\\n' >> cabal.project ; fi"
161− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-basic-streaming-*/*.cabal\"\\n' >> cabal.project ; fi"
162− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-db-postgres-pool-*/*.cabal\"\\n' >> cabal.project ; fi"
163− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-db-sqlite-simple-*/*.cabal\"\\n' >> cabal.project ; fi"
164− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-file-upload-*/*.cabal\"\\n' >> cabal.project ; fi"
165− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-generic-*/*.cabal\"\\n' >> cabal.project ; fi"
166− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-https-*/*.cabal\"\\n' >> cabal.project ; fi"
167− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-pagination-*/*.cabal\"\\n' >> cabal.project ; fi"
168− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-testing-*/*.cabal\"\\n' >> cabal.project ; fi"
169− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-structuring-apis-*/*.cabal\"\\n' >> cabal.project ; fi"
170− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-using-custom-monad-*/*.cabal\"\\n' >> cabal.project ; fi"
171− - "if [ $HCNUMVER -eq 80404 ] || [ $HCNUMVER -eq 80604 ] ; then printf 'packages: \"cookbook-using-free-client-*/*.cabal\"\\n' >> cabal.project ; fi"
172− - "echo 'constraints: foundation >=0.0.14' >> cabal.project"
173− - "echo 'constraints: memory <0.14.12 || >0.14.12' >> cabal.project"
174− - "echo 'allow-newer: servant-quickcheck:servant' >> cabal.project"
175− - "echo 'allow-newer: servant-quickcheck:servant-client' >> cabal.project"
176− - "echo 'allow-newer: servant-quickcheck:servant-server' >> cabal.project"
177− - "echo 'allow-newer: servant-quickcheck:hspec' >> cabal.project"
178− - "echo 'allow-newer: servant-quickcheck:http-client' >> cabal.project"
179− - "echo 'optimization: False' >> cabal.project "
180− - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
181− - touch cabal.project.local
182− - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-db-sqlite-simple|cookbook-file-upload|cookbook-generic|cookbook-https|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
238+ - |
239+ echo "packages: ${PKGDIR_servant}" >> cabal.project
240+ echo "packages: ${PKGDIR_servant_client}" >> cabal.project
241+ echo "packages: ${PKGDIR_servant_client_core}" >> cabal.project
242+ echo "packages: ${PKGDIR_servant_http_streams}" >> cabal.project
243+ echo "packages: ${PKGDIR_servant_docs}" >> cabal.project
244+ echo "packages: ${PKGDIR_servant_foreign}" >> cabal.project
245+ echo "packages: ${PKGDIR_servant_server}" >> cabal.project
246+ echo "packages: ${PKGDIR_tutorial}" >> cabal.project
247+ echo "packages: ${PKGDIR_servant_machines}" >> cabal.project
248+ echo "packages: ${PKGDIR_servant_conduit}" >> cabal.project
249+ echo "packages: ${PKGDIR_servant_pipes}" >> cabal.project
250+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_auth}" >> cabal.project ; fi
251+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_curl_mock}" >> cabal.project ; fi
252+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_streaming}" >> cabal.project ; fi
253+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_db_postgres_pool}" >> cabal.project ; fi
254+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_file_upload}" >> cabal.project ; fi
255+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_generic}" >> cabal.project ; fi
256+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_testing}" >> cabal.project ; fi
257+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_structuring_apis}" >> cabal.project ; fi
258+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_using_custom_monad}" >> cabal.project ; fi
259+ if [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_using_free_client}" >> cabal.project ; fi
260+ - |
261+ echo "constraints: foundation >=0.0.14" >> cabal.project
262+ echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
263+ echo "constraints: sqlite-simple < 0" >> cabal.project
264+ echo "allow-newer: servant-multipart:http-media" >> cabal.project
265+ echo "allow-newer: servant-multipart:lens" >> cabal.project
266+ echo "allow-newer: servant-js:base" >> cabal.project
267+ echo "allow-newer: servant-js:lens" >> cabal.project
268+ echo "allow-newer: servant-quickcheck:base" >> cabal.project
269+ echo "allow-newer: servant-quickcheck:hspec" >> cabal.project
270+ echo "allow-newer: servant-quickcheck:http-client" >> cabal.project
271+ echo "allow-newer: servant-quickcheck:http-media" >> cabal.project
272+ echo "allow-newer: servant-quickcheck:QuickCheck" >> cabal.project
273+ echo "allow-newer: servant-quickcheck:servant" >> cabal.project
274+ echo "allow-newer: servant-quickcheck:servant-client" >> cabal.project
275+ echo "allow-newer: servant-quickcheck:servant-server" >> cabal.project
276+ echo "allow-newer: servant-quickcheck:time" >> cabal.project
277+ echo "allow-newer: servant-quickcheck:warp" >> cabal.project
278+ echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
279+ echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
280+ echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
281+ echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
282+ echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
283+ echo "allow-newer: io-streams:primitive" >> cabal.project
284+ echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
285+ echo "optimization: False" >> cabal.project
286+ echo "" >> cabal.project
287+ echo "source-repository-package" >> cabal.project
288+ echo " type: git" >> cabal.project
289+ echo " location: https://github.com/luqui/control-monad-omega.git" >> cabal.project
290+ echo " tag: 76c71e8917eec275ba423959f00a34583b5c7215" >> cabal.project
291+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
183292 - cat cabal.project || true
184293 - cat cabal.project.local || true
185294 - echo -en 'travis_fold:end:unpack\\r'
186−
187− - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
295+ # Building with tests and benchmarks...
296+ - echo 'Building with tests and benchmarks...' && echo -en 'travis_fold:start:build-everything\\r'
188297 # build & run tests, build benchmarks
189− - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
298+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
190299 - echo -en 'travis_fold:end:build-everything\\r'
191− - if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
192−
193− - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
194− # haddock
195− - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
196−
300+ # Testing...
301+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
302+ # haddock...
303+ - echo 'haddock...' && echo -en 'travis_fold:start:haddock\\r'
304+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
197305 - echo -en 'travis_fold:end:haddock\\r'
306+ # Constraint sets
307+ - rm -rf cabal.project.local
308+ # Constraint set http-media-0.8
309+ - echo 'Constraint set http-media-0.8' && echo -en 'travis_fold:start:constraint-sets-http-media-0.8\\r'
310+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-media ==0.8.*' all | color_cabal_output
311+ - echo -en 'travis_fold:end:constraint-sets-http-media-0.8\\r'
312+ # Constraint set http-media-0.7
313+ - echo 'Constraint set http-media-0.7' && echo -en 'travis_fold:start:constraint-sets-http-media-0.7\\r'
314+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='http-media ==0.7.*' all | color_cabal_output
315+ - echo -en 'travis_fold:end:constraint-sets-http-media-0.7\\r'
316+
198317# REGENDATA ["--config=cabal.haskell-ci","--output=.travis.yml","cabal.project"]
199318# EOF
cabal.haskell-ci+9−1
@@ -1,5 +1,5 @@
11folds: all-but-test
2−branches: master
2+branches: master release-0.16
33jobs-selection: any
44
55-- We have inplace packages (servant-js) so we skip installing dependencies in a separate step
@@ -14,3 +14,11 @@ cabal-check: False
1414
1515-- ghc-options: -j2
1616jobs: :2
17+
18+constraint-set http-media-0.8
19+ constraints: http-media ==0.8.*
20+
21+constraint-set http-media-0.7
22+ constraints: http-media ==0.7.*
23+
24+head-hackage: >= 8.8
cabal.project+43−5
@@ -18,13 +18,13 @@ packages:
1818 doc/cookbook/curl-mock
1919 doc/cookbook/basic-streaming
2020 doc/cookbook/db-postgres-pool
21− doc/cookbook/db-sqlite-simple
21+-- doc/cookbook/db-sqlite-simple
2222 doc/cookbook/file-upload
2323 doc/cookbook/generic
2424 -- doc/cookbook/hoist-server-with-context
25− doc/cookbook/https
25+-- doc/cookbook/https
2626 -- doc/cookbook/jwt-and-basic-auth/
27− doc/cookbook/pagination
27+-- doc/cookbook/pagination
2828 -- doc/cookbook/sentry
2929 doc/cookbook/testing
3030 doc/cookbook/structuring-apis
@@ -40,6 +40,14 @@ constraints:
4040 foundation >=0.0.14,
4141 memory <0.14.12 || >0.14.12
4242
43+allow-newer:
44+ servant-multipart:http-media,
45+ servant-multipart:lens
46+
47+allow-newer:
48+ servant-js:base,
49+ servant-js:lens
50+
4351allow-newer:
4452-- servant-pagination:servant, servant-pagination:servant-server,
4553-- servant-multipart:servant, servant-multipart:servant-server,
@@ -48,6 +56,36 @@ allow-newer:
4856
4957-- servant-quickcheck
5058allow-newer:
51− servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,
59+ servant-quickcheck:base,
5260 servant-quickcheck:hspec,
53− servant-quickcheck:http-client
61+ servant-quickcheck:http-client,
62+ servant-quickcheck:http-media,
63+ servant-quickcheck:QuickCheck,
64+ servant-quickcheck:servant,
65+ servant-quickcheck:servant-client,
66+ servant-quickcheck:servant-server,
67+ servant-quickcheck:time,
68+ servant-quickcheck:warp
69+
70+-- constraints: semigroups ^>=0.19
71+-- constraints: hashable ^>=1.3
72+-- constraints: network ^>=3.1
73+-- constraints: machines ^>=0.7
74+-- constraints: http-media ^>=0.8
75+
76+allow-newer: vault-0.3.1.2:hashable
77+allow-newer: psqueues-0.2.7.1:hashable
78+allow-newer: sqlite-simple-0.4.16.0:semigroups
79+allow-newer: direct-sqlite-2.3.24:semigroups
80+allow-newer: io-streams-1.5.1.0:network
81+allow-newer: io-streams:primitive
82+allow-newer: openssl-streams-1.2.2.0:network
83+
84+source-repository-package
85+ type: git
86+ location: https://github.com/luqui/control-monad-omega.git
87+ tag: 76c71e8917eec275ba423959f00a34583b5c7215
88+
89+-- MonadFail
90+-- https://github.com/nurpax/sqlite-simple/issues/74
91+constraints: sqlite-simple < 0
doc/cookbook/basic-auth/basic-auth.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-basic-auth
1414 main-is: BasicAuth.lhs
doc/cookbook/basic-streaming/basic-streaming.cabal+2−2
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-basic-streaming
1414 main-is: Streaming.lhs
@@ -17,7 +17,7 @@ executable cookbook-basic-streaming
1717 ghc-options: -Wall -pgmL markdown-unlit -threaded -rtsopts
1818
1919 hs-source-dirs: .
20− build-depends: base >= 4.8 && <4.13
20+ build-depends: base >= 4.8 && <5
2121 , aeson
2222 , bytestring
2323 , servant
doc/cookbook/curl-mock/curl-mock.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbock-curl-mock
1414 main-is: CurlMock.lhs
doc/cookbook/db-postgres-pool/db-postgres-pool.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-db-postgres-pool
1414 main-is: PostgresPool.lhs
doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-db-sqlite-simple
1414 main-is: DBConnection.lhs
doc/cookbook/file-upload/file-upload.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-file-upload
1414 main-is: FileUpload.lhs
doc/cookbook/generic/generic.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-using-custom-monad
1414 main-is: Generic.lhs
doc/cookbook/hoist-server-with-context/hoist-server-with-context.cabal+1−1
@@ -11,7 +11,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
1111category: Servant
1212build-type: Simple
1313cabal-version: >=1.10
14−tested-with: GHC==8.4.4, GHC==8.6.4
14+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1515
1616executable cookbook-hoist-server-with-context
1717 main-is: HoistServerWithContext.lhs
doc/cookbook/https/https.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-https
1414 main-is: Https.lhs
doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal+1−1
@@ -11,7 +11,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
1111category: Servant
1212build-type: Simple
1313cabal-version: >=1.10
14−tested-with: GHC==8.4.4, GHC==8.6.4
14+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1515
1616executable cookbook-jwt-and-basic-auth
1717 main-is: JWTAndBasicAuth.lhs
doc/cookbook/pagination/pagination.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-pagination
1414 main-is: Pagination.lhs
doc/cookbook/sentry/sentry.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-sentry
1414 main-is: Sentry.lhs
doc/cookbook/structuring-apis/structuring-apis.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-structuring-apis
1414 main-is: StructuringApis.lhs
doc/cookbook/testing/testing.cabal+1−1
@@ -10,7 +10,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
1010category: Servant
1111build-type: Simple
1212cabal-version: >=1.10
13−tested-with: GHC==8.4.4, GHC==8.6.4
13+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1414
1515executable cookbook-testing
1616 main-is: Testing.lhs
doc/cookbook/using-custom-monad/using-custom-monad.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-using-custom-monad
1414 main-is: UsingCustomMonad.lhs
doc/cookbook/using-free-client/using-free-client.cabal+1−1
@@ -8,7 +8,7 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11−tested-with: GHC==8.4.4, GHC==8.6.4
11+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
1212
1313executable cookbook-using-free-client
1414 main-is: UsingFreeClient.lhs
doc/tutorial/tutorial.cabal+4−3
@@ -16,7 +16,8 @@ tested-with:
1616 GHC==8.0.2
1717 GHC==8.2.2
1818 GHC==8.4.4
19− GHC==8.6.4
19+ GHC==8.6.5
20+ GHC==8.8.1
2021extra-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.13
38+ base >= 4.7 && <5
3839 , aeson
3940 , attoparsec
4041 , base-compat
@@ -69,7 +70,7 @@ library
6970 , lucid >= 2.9.11 && < 2.10
7071 , random >= 1.1 && < 1.2
7172 , servant-js >= 0.9 && < 0.10
72− , time >= 1.6.0.1 && < 1.9
73+ , time >= 1.6.0.1 && < 1.10
7374
7475 -- For legacy tools, we need to specify build-depends too
7576 build-depends: markdown-unlit >= 0.5.0 && <0.6
servant-client-core/servant-client-core.cabal+8−6
@@ -1,6 +1,7 @@
11cabal-version: >=1.10
22name: servant-client-core
33version: 0.16
4+x-revision: 1
45
56synopsis: Core functionality and class for client function generation for servant APIs
67category: Servant, Web
@@ -20,7 +21,8 @@ tested-with:
2021 GHC ==8.0.2
2122 || ==8.2.2
2223 || ==8.4.4
23− || ==8.6.4
24+ || ==8.6.5
25+ || ==8.8.1
2426
2527extra-source-files:
2628 CHANGELOG.md
@@ -53,13 +55,13 @@ library
5355 --
5456 -- note: mtl lower bound is so low because of GHC-7.8
5557 build-depends:
56− base >= 4.9 && < 4.13
58+ base >= 4.9 && < 4.14
5759 , bytestring >= 0.10.8.1 && < 0.11
5860 , containers >= 0.5.7.1 && < 0.7
5961 , deepseq >= 1.4.2.0 && < 1.5
6062 , text >= 1.2.3.0 && < 1.3
6163 , transformers >= 0.5.2.0 && < 0.6
62− , template-haskell >= 2.11.1.0 && < 2.15
64+ , template-haskell >= 2.11.1.0 && < 2.16
6365
6466 if !impl(ghc >= 8.2)
6567 build-depends:
@@ -73,11 +75,11 @@ library
7375 -- Here can be exceptions if we really need features from the newer versions.
7476 build-depends:
7577 aeson >= 1.4.1.0 && < 1.5
76− , base-compat >= 0.10.5 && < 0.11
78+ , base-compat >= 0.10.5 && < 0.12
7779 , base64-bytestring >= 1.0.0.1 && < 1.1
7880 , exceptions >= 0.10.0 && < 0.11
7981 , free >= 5.1 && < 5.2
80− , http-media >= 0.7.1.3 && < 0.8
82+ , http-media >= 0.7.1.3 && < 0.9
8183 , http-types >= 0.12.2 && < 0.13
8284 , network-uri >= 2.6.1.0 && < 2.7
8385 , safe >= 0.3.17 && < 0.4
@@ -105,7 +107,7 @@ test-suite spec
105107 build-depends:
106108 deepseq >= 1.4.2.0 && < 1.5
107109 , hspec >= 2.6.0 && < 2.8
108− , QuickCheck >= 2.12.6.1 && < 2.13
110+ , QuickCheck >= 2.12.6.1 && < 2.14
109111
110112 build-tool-depends:
111113 hspec-discover:hspec-discover >= 2.6.0 && <2.8
servant-client-ghcjs/servant-client-ghcjs.cabal+1−1
@@ -45,7 +45,7 @@ library
4545 , exceptions >=0.8 && <0.11
4646 , ghcjs-base >=0.2.0.0 && <0.3.0.0
4747 , ghcjs-prim >=0.1.0.0 && <0.2.0.0
48− , http-media >=0.6.2 && <0.8
48+ , http-media >=0.6.2 && <0.9
4949 , http-types >=0.12 && <0.13
5050 , monad-control >=1.0.0.4 && <1.1
5151 , mtl >=2.2.2 && <2.3
servant-client/servant-client.cabal+9−7
@@ -1,6 +1,7 @@
11cabal-version: >=1.10
22name: servant-client
33version: 0.16
4+x-revision: 2
45
56synopsis: Automatic derivation of querying functions for servant
67category: Servant, Web
@@ -24,7 +25,8 @@ tested-with:
2425 GHC ==8.0.2
2526 || ==8.2.2
2627 || ==8.4.4
27− || ==8.6.4
28+ || ==8.6.5
29+ || ==8.8.1
2830
2931extra-source-files:
3032 CHANGELOG.md
@@ -44,14 +46,14 @@ library
4446 -- Bundled with GHC: Lower bound to not force re-installs
4547 -- text and mtl are bundled starting with GHC-8.4
4648 build-depends:
47− base >= 4.9 && < 4.13
49+ base >= 4.9 && < 4.14
4850 , bytestring >= 0.10.8.1 && < 0.11
4951 , containers >= 0.5.7.1 && < 0.7
5052 , deepseq >= 1.4.2.0 && < 1.5
5153 , mtl >= 2.2.2 && < 2.3
5254 , stm >= 2.4.5.1 && < 2.6
5355 , text >= 1.2.3.0 && < 1.3
54− , time >= 1.6.0.1 && < 1.9
56+ , time >= 1.6.0.1 && < 1.10
5557 , transformers >= 0.5.2.0 && < 0.6
5658
5759 if !impl(ghc >= 8.2)
@@ -67,9 +69,9 @@ library
6769 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
6870 -- Here can be exceptions if we really need features from the newer versions.
6971 build-depends:
70− base-compat >= 0.10.5 && < 0.11
72+ base-compat >= 0.10.5 && < 0.12
7173 , http-client >= 0.5.13.1 && < 0.7
72− , http-media >= 0.7.1.3 && < 0.8
74+ , http-media >= 0.7.1.3 && < 0.9
7375 , http-types >= 0.12.2 && < 0.13
7476 , exceptions >= 0.10.0 && < 0.11
7577 , kan-extensions >= 5.2 && < 5.3
@@ -117,8 +119,8 @@ test-suite spec
117119 entropy >= 0.4.1.3 && < 0.5
118120 , hspec >= 2.6.0 && < 2.8
119121 , HUnit >= 1.6.0.0 && < 1.7
120− , network >= 2.8.0.0 && < 3.1
121− , QuickCheck >= 2.12.6.1 && < 2.13
122+ , network >= 2.8.0.0 && < 3.2
123+ , QuickCheck >= 2.12.6.1 && < 2.14
122124 , servant == 0.16.*
123125 , servant-server == 0.16.*
124126 , tdigest >= 0.2 && < 0.3
servant-conduit/servant-conduit.cabal+3−2
@@ -21,7 +21,8 @@ tested-with:
2121 GHC ==8.0.2
2222 || ==8.2.2
2323 || ==8.4.4
24− || ==8.6.4
24+ || ==8.6.5
25+ || ==8.8.1
2526
2627extra-source-files:
2728 CHANGELOG.md
@@ -62,6 +63,6 @@ test-suite example
6263 , servant-server >=0.15 && <0.17
6364 , servant-client >=0.15 && <0.17
6465 , wai >=3.2.1.2 && <3.3
65− , warp >=3.2.25 && <3.3
66+ , warp >=3.2.25 && <3.4
6667 , http-client
6768 default-language: Haskell2010
servant-docs/servant-docs.cabal+8−7
@@ -1,7 +1,7 @@
11cabal-version: >=1.10
22name: servant-docs
33version: 0.11.3
4−x-revision: 1
4+x-revision: 3
55
66synopsis: generate API docs for your servant webservice
77category: Servant, Web
@@ -24,7 +24,8 @@ tested-with:
2424 GHC ==8.0.2
2525 || ==8.2.2
2626 || ==8.4.4
27− || ==8.6.4
27+ || ==8.6.5
28+ || ==8.8.1
2829
2930extra-source-files:
3031 CHANGELOG.md
@@ -46,7 +47,7 @@ library
4647 --
4748 -- note: mtl lower bound is so low because of GHC-7.8
4849 build-depends:
49− base >= 4.9 && < 4.13
50+ base >= 4.9 && < 4.14
5051 , bytestring >= 0.10.8.1 && < 0.11
5152 , text >= 1.2.3.0 && < 1.3
5253
@@ -59,13 +60,13 @@ library
5960 build-depends:
6061 aeson >= 1.4.1.0 && < 1.5
6162 , aeson-pretty >= 0.8.5 && < 0.9
62− , base-compat >= 0.10.5 && < 0.11
63+ , base-compat >= 0.10.5 && < 0.12
6364 , case-insensitive >= 1.2.0.11 && < 1.3
6465 , control-monad-omega >= 0.3.1 && < 0.4
65− , hashable >= 1.2.7.0 && < 1.3
66− , http-media >= 0.7.1.3 && < 0.8
66+ , hashable >= 1.2.7.0 && < 1.4
67+ , http-media >= 0.7.1.3 && < 0.9
6768 , http-types >= 0.12.2 && < 0.13
68− , lens >= 4.17 && < 4.18
69+ , lens >= 4.17 && < 4.19
6970 , string-conversions >= 0.4.0.1 && < 0.5
7071 , unordered-containers >= 0.2.9.0 && < 0.3
7172
servant-foreign/servant-foreign.cabal+5−4
@@ -26,7 +26,8 @@ tested-with:
2626 GHC ==8.0.2
2727 || ==8.2.2
2828 || ==8.4.4
29− || ==8.6.4
29+ || ==8.6.5
30+ || ==8.8.1
3031
3132extra-source-files:
3233 CHANGELOG.md
@@ -46,7 +47,7 @@ library
4647 --
4748 -- note: mtl lower bound is so low because of GHC-7.8
4849 build-depends:
49− base >= 4.9 && < 4.13
50+ base >= 4.9 && < 4.14
5051 , text >= 1.2.3.0 && < 1.3
5152
5253 -- Servant dependencies
@@ -56,8 +57,8 @@ library
5657 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
5758 -- Here can be exceptions if we really need features from the newer versions.
5859 build-depends:
59− base-compat >= 0.10.5 && < 0.11
60− , lens >= 4.17 && < 4.18
60+ base-compat >= 0.10.5 && < 0.12
61+ , lens >= 4.17 && < 4.19
6162 , http-types >= 0.12.2 && < 0.13
6263
6364 hs-source-dirs: src
servant-http-streams/servant-http-streams.cabal+9−7
@@ -1,6 +1,7 @@
11cabal-version: >=1.10
22name: servant-http-streams
33version: 0.16
4+x-revision: 2
45
56synopsis: Automatic derivation of querying functions for servant
67category: Servant, Web
@@ -24,7 +25,8 @@ tested-with:
2425 GHC ==8.0.2
2526 || ==8.2.2
2627 || ==8.4.4
27− || ==8.6.4
28+ || ==8.6.5
29+ || ==8.8.1
2830
2931extra-source-files:
3032 CHANGELOG.md
@@ -42,13 +44,13 @@ library
4244 -- Bundled with GHC: Lower bound to not force re-installs
4345 -- text and mtl are bundled starting with GHC-8.4
4446 build-depends:
45− base >= 4.9 && < 4.13
47+ base >= 4.9 && < 4.14
4648 , bytestring >= 0.10.8.1 && < 0.11
4749 , containers >= 0.5.7.1 && < 0.7
4850 , deepseq >= 1.4.2.0 && < 1.5
4951 , mtl >= 2.2.2 && < 2.3
5052 , text >= 1.2.3.0 && < 1.3
51− , time >= 1.6.0.1 && < 1.9
53+ , time >= 1.6.0.1 && < 1.10
5254 , transformers >= 0.5.2.0 && < 0.6
5355
5456 if !impl(ghc >= 8.2)
@@ -64,10 +66,10 @@ library
6466 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
6567 -- Here can be exceptions if we really need features from the newer versions.
6668 build-depends:
67− base-compat >= 0.10.5 && < 0.11
69+ base-compat >= 0.10.5 && < 0.12
6870 , case-insensitive
6971 , http-streams >= 0.8.6.1 && < 0.9
70− , http-media >= 0.7.1.3 && < 0.8
72+ , http-media >= 0.7.1.3 && < 0.9
7173 , io-streams >= 1.5.0.1 && < 1.6
7274 , http-types >= 0.12.2 && < 0.13
7375 , http-common >= 0.8.2.0 && < 0.9
@@ -118,8 +120,8 @@ test-suite spec
118120 entropy >= 0.4.1.3 && < 0.5
119121 , hspec >= 2.6.0 && < 2.8
120122 , HUnit >= 1.6.0.0 && < 1.7
121− , network >= 2.8.0.0 && < 3.1
122− , QuickCheck >= 2.12.6.1 && < 2.13
123+ , network >= 2.8.0.0 && < 3.2
124+ , QuickCheck >= 2.12.6.1 && < 2.14
123125 , servant == 0.16.*
124126 , servant-server == 0.16.*
125127 , tdigest >= 0.2 && < 0.3
servant-machines/servant-machines.cabal+5−4
@@ -1,7 +1,7 @@
11cabal-version: >=1.10
22name: servant-machines
33version: 0.15
4−x-revision: 1
4+x-revision: 2
55
66synopsis: Servant Stream support for machines
77category: Servant, Web, Enumerator
@@ -21,7 +21,8 @@ tested-with:
2121 GHC ==8.0.2
2222 || ==8.2.2
2323 || ==8.4.4
24− || ==8.6.4
24+ || ==8.6.5
25+ || ==8.8.1
2526
2627extra-source-files:
2728 CHANGELOG.md
@@ -35,7 +36,7 @@ library
3536 build-depends:
3637 base >=4.9 && <5
3738 , bytestring >=0.10.8.1 && <0.11
38− , machines >=0.6.4 && <0.7
39+ , machines >=0.6.4 && <0.8
3940 , mtl >=2.2.2 && <2.3
4041 , servant >=0.15 && <0.17
4142 hs-source-dirs: src
@@ -59,6 +60,6 @@ test-suite example
5960 , servant-server >=0.15 && <0.17
6061 , servant-client >=0.15 && <0.17
6162 , wai >=3.2.1.2 && <3.3
62− , warp >=3.2.25 && <3.3
63+ , warp >=3.2.25 && <3.4
6364 , http-client
6465 default-language: Haskell2010
servant-pipes/servant-pipes.cabal+3−2
@@ -21,7 +21,8 @@ tested-with:
2121 GHC ==8.0.2
2222 || ==8.2.2
2323 || ==8.4.4
24− || ==8.6.4
24+ || ==8.6.5
25+ || ==8.8.1
2526
2627extra-source-files:
2728 CHANGELOG.md
@@ -63,6 +64,6 @@ test-suite example
6364 , servant-server >=0.15 && <0.17
6465 , servant-client >=0.15 && <0.17
6566 , wai >=3.2.1.2 && <3.3
66− , warp >=3.2.25 && <3.3
67+ , warp >=3.2.25 && <3.4
6768 , http-client
6869 default-language: Haskell2010
servant-pipes/src/Servant/Pipes.hs+1−1
@@ -65,7 +65,7 @@ instance (MonadIO m, a' ~ X, a ~ (), b' ~ (), r ~ ())
6565 fromSourceIO src = M $ liftIO $ S.unSourceT src (return . go) where
6666 go :: S.StepT IO b -> Proxy X () () b m ()
6767 go S.Stop = Pure ()
68− go (S.Error err) = M (fail err)
68+ go (S.Error err) = M (liftIO (fail err))
6969 go (S.Skip s) = go s -- drives
7070 go (S.Effect ms) = M (liftIO (fmap go ms))
7171 go (S.Yield x s) = Respond x (const (go s))
servant-server/CHANGELOG.md+14
@@ -1,6 +1,20 @@
11[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/CHANGELOG.md)
22[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
33
4+0.16.2
5+------
6+
7+* `singleton-bool-0.1.5` (`SBool` is re-exported)
8+ - Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
9+ - Add `Show`, `Eq`, `Ord` `SBool b` instances.
10+* dependencies update
11+
12+0.16.1
13+------
14+
15+* Use `http-api-data-0.4.1` (a part of its API is re-exported)
16+ [#1181](https://github.com/haskell-servant/servant/pull/1181)
17+
4180.16
519----
620
servant-server/servant-server.cabal+11−10
@@ -1,6 +1,6 @@
11cabal-version: >=1.10
22name: servant-server
3−version: 0.16
3+version: 0.16.2
44
55synopsis: A family of combinators for defining webservices APIs and serving them
66category: Servant, Web
@@ -27,7 +27,8 @@ tested-with:
2727 GHC ==8.0.2
2828 || ==8.2.2
2929 || ==8.4.4
30− || ==8.6.4
30+ || ==8.6.5
31+ || ==8.8.1
3132
3233extra-source-files:
3334 CHANGELOG.md
@@ -68,7 +69,7 @@ library
6869 -- Bundled with GHC: Lower bound to not force re-installs
6970 -- text and mtl are bundled starting with GHC-8.4
7071 build-depends:
71− base >= 4.9 && < 4.13
72+ base >= 4.9 && < 4.14
7273 , bytestring >= 0.10.8.1 && < 0.11
7374 , containers >= 0.5.7.1 && < 0.7
7475 , mtl >= 2.2.2 && < 2.3
@@ -79,20 +80,20 @@ library
7980 -- Servant dependencies
8081 -- strict dependency as we re-export 'servant' things.
8182 build-depends:
82− servant >= 0.16 && < 0.17.1
83− , http-api-data >= 0.4 && < 0.4.1
83+ servant >= 0.16.2 && < 0.16.3
84+ , http-api-data >= 0.4.1 && < 0.4.2
8485
8586 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
8687 -- Here can be exceptions if we really need features from the newer versions.
8788 build-depends:
88− base-compat >= 0.10.5 && < 0.11
89+ base-compat >= 0.10.5 && < 0.12
8990 , base64-bytestring >= 1.0.0.1 && < 1.1
9091 , exceptions >= 0.10.0 && < 0.11
91− , http-media >= 0.7.1.3 && < 0.8
92+ , http-media >= 0.7.1.3 && < 0.9
9293 , http-types >= 0.12.2 && < 0.13
9394 , network-uri >= 2.6.1.0 && < 2.8
9495 , monad-control >= 1.0.2.3 && < 1.1
95− , network >= 2.8 && < 3.1
96+ , network >= 2.8 && < 3.2
9697 , string-conversions >= 0.4.0.1 && < 0.5
9798 , resourcet >= 1.2.2 && < 1.3
9899 , tagged >= 0.8.6 && < 0.9
@@ -120,7 +121,7 @@ executable greet
120121
121122 build-depends:
122123 aeson >= 1.4.1.0 && < 1.5
123− , warp >= 3.2.25 && < 3.3
124+ , warp >= 3.2.25 && < 3.4
124125
125126test-suite spec
126127 type: exitcode-stdio-1.0
@@ -165,7 +166,7 @@ test-suite spec
165166 , directory >= 1.3.0.0 && < 1.4
166167 , hspec >= 2.6.0 && < 2.8
167168 , hspec-wai >= 0.9.0 && < 0.10
168− , QuickCheck >= 2.12.6.1 && < 2.13
169+ , QuickCheck >= 2.12.6.1 && < 2.14
169170 , should-not-typecheck >= 2.1.0 && < 2.2
170171 , temporary >= 1.3 && < 1.4
171172 , wai-extra >= 3.0.24.3 && < 3.1
servant/CHANGELOG.md+23
@@ -1,5 +1,28 @@
11[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
22
3+0.16.2
4+------
5+
6+* `singleton-bool-0.1.5` (`SBool` is re-exported)
7+ - Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
8+ - Add `Show`, `Eq`, `Ord` `SBool b` instances.
9+* dependencies update
10+
11+0.16.1
12+------
13+
14+* Add `Semigroup` and `Monoid` `SourceT` instances
15+ [#1158](https://github.com/haskell-servant/servant/pull/1158)
16+ [#1159](https://github.com/haskell-servant/servant/pull/1159)
17+* Use `http-api-data-0.4.1`
18+ [#1181](https://github.com/haskell-servant/servant/pull/1181)
19+* Allow newer dependencies
20+
21+0.16.0.1
22+--------
23+
24+- Make tests work with `http-media-0.8`
25+
3260.16
427----
528
servant/servant.cabal+11−9
@@ -1,6 +1,6 @@
11cabal-version: >=1.10
22name: servant
3−version: 0.16
3+version: 0.16.2
44
55synopsis: A family of combinators for defining webservices APIs
66category: Servant, Web
@@ -24,7 +24,8 @@ tested-with:
2424 GHC ==8.0.2
2525 || ==8.2.2
2626 || ==8.4.4
27− || ==8.6.4
27+ || ==8.6.5
28+ || ==8.8.1
2829
2930extra-source-files:
3031 CHANGELOG.md
@@ -88,7 +89,7 @@ library
8889 --
8990 -- note: mtl lower bound is so low because of GHC-7.8
9091 build-depends:
91− base >= 4.9 && < 4.13
92+ base >= 4.9 && < 4.14
9293 , bytestring >= 0.10.8.1 && < 0.11
9394 , mtl >= 2.2.2 && < 2.3
9495 , transformers >= 0.5.2.0 && < 0.6
@@ -98,23 +99,23 @@ library
9899 -- We depend (heavily) on the API of these packages:
99100 -- i.e. re-export, or allow using without direct dependency
100101 build-depends:
101− http-api-data >= 0.4 && < 0.4.1
102− , singleton-bool >= 0.1.4 && < 0.1.5
102+ http-api-data >= 0.4.1 && < 0.4.2
103+ , singleton-bool >= 0.1.5 && < 0.1.6
103104
104105 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
105106 -- Here can be exceptions if we really need features from the newer versions.
106107 build-depends:
107− base-compat >= 0.10.5 && < 0.11
108+ base-compat >= 0.10.5 && < 0.12
108109 , aeson >= 1.4.1.0 && < 1.5
109110 , attoparsec >= 0.13.2.2 && < 0.14
110111 , bifunctors >= 5.5.3 && < 5.6
111112 , case-insensitive >= 1.2.0.11 && < 1.3
112113 , deepseq >= 1.4.2.0 && < 1.5
113− , http-media >= 0.7.1.3 && < 0.8
114+ , http-media >= 0.7.1.3 && < 0.9
114115 , http-types >= 0.12.2 && < 0.13
115116 , mmorph >= 1.1.2 && < 1.2
116117 , network-uri >= 2.6.1.0 && < 2.7
117− , QuickCheck >= 2.12.6.1 && <2.13
118+ , QuickCheck >= 2.12.6.1 && < 2.14
118119 , string-conversions >= 0.4.0.1 && < 0.5
119120 , tagged >= 0.8.6 && < 0.9
120121 , vault >= 0.3.1.2 && < 0.4
@@ -161,6 +162,7 @@ test-suite spec
161162 , base-compat
162163 , aeson
163164 , bytestring
165+ , http-media
164166 , mtl
165167 , servant
166168 , string-conversions
@@ -170,7 +172,7 @@ test-suite spec
170172 -- Additonal dependencies
171173 build-depends:
172174 hspec >= 2.6.0 && < 2.8
173− , QuickCheck >= 2.12.6.1 && < 2.13
175+ , QuickCheck >= 2.12.6.1 && < 2.14
174176 , quickcheck-instances >= 0.3.19 && < 0.4
175177
176178 build-tool-depends:
servant/src/Servant/Types/SourceT.hs+32
@@ -89,6 +89,21 @@ instance MFunctor SourceT where
8989 hoist f (SourceT m) = SourceT $ \k -> k $
9090 Effect $ f $ fmap (hoist f) $ m return
9191
92+-- | >>> source "xy" <> source "z" :: SourceT Identity Char
93+-- fromStepT (Effect (Identity (Yield 'x' (Yield 'y' (Yield 'z' Stop)))))
94+--
95+instance Functor m => Semigroup (SourceT m a) where
96+ SourceT withL <> SourceT withR = SourceT $ \ret ->
97+ withL $ \l ->
98+ withR $ \r ->
99+ ret $ l <> r
100+
101+-- | >>> mempty :: SourceT Maybe Int
102+-- fromStepT (Effect (Just Stop))
103+instance Functor m => Monoid (SourceT m a) where
104+ mempty = fromStepT mempty
105+ mappend = (<>)
106+
92107-- | Doesn't generate 'Error' constructors. 'SourceT' doesn't shrink.
93108instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (SourceT m a) where
94109 arbitrary = fromStepT <$> QC.arbitrary
@@ -150,6 +165,23 @@ instance MFunctor StepT where
150165 go (Yield x s) = Yield x (go s)
151166 go (Effect ms) = Effect (f (fmap go ms))
152167
168+instance Functor m => Semigroup (StepT m a) where
169+ Stop <> r = r
170+ Error err <> _ = Error err
171+ Skip s <> r = Skip (s <> r)
172+ Yield x s <> r = Yield x (s <> r)
173+ Effect ms <> r = Effect ((<> r) <$> ms)
174+
175+-- | >>> mempty :: StepT [] Int
176+-- Stop
177+--
178+-- >>> mempty :: StepT Identity Int
179+-- Stop
180+--
181+instance Functor m => Monoid (StepT m a) where
182+ mempty = Stop
183+ mappend = (<>)
184+
153185-- | Doesn't generate 'Error' constructors.
154186instance (QC.Arbitrary a, Monad m) => QC.Arbitrary (StepT m a) where
155187 arbitrary = QC.sized arb where
servant/test/Servant/API/ContentTypesSpec.hs+18−5
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE DataKinds #-}
23{-# LANGUAGE DeriveGeneric #-}
34{-# LANGUAGE MultiParamTypeClasses #-}
@@ -20,7 +21,7 @@ import Data.Either
2021import Data.Function
2122 (on)
2223import Data.List
23− (maximumBy)
24+ (sortBy)
2425import qualified Data.List.NonEmpty as NE
2526import Data.Maybe
2627 (fromJust, isJust, isNothing)
@@ -134,17 +135,29 @@ spec = describe "Servant.API.ContentTypes" $ do
134135 == Just ("application/json;charset=utf-8", encode x)
135136
136137 it "respects the Accept spec ordering" $ do
137− let highest a b c = maximumBy (compare `on` snd)
138+ let highest a b c = last $ sortBy (compare `on` snd)
139+-- when qualities are same, http-media-0.8 picks first; 0.7 last.
140+#if MIN_VERSION_http_media(0,8,0)
141+ [ ("text/plain;charset=utf-8", c)
142+ , ("application/json;charset=utf-8", b)
143+ , ("application/octet-stream", a)
144+ ]
145+#else
138146 [ ("application/octet-stream", a)
139147 , ("application/json;charset=utf-8", b)
140148 , ("text/plain;charset=utf-8", c)
141149 ]
150+#endif
142151 let acceptH a b c = addToAccept (Proxy :: Proxy OctetStream) a $
143− addToAccept (Proxy :: Proxy JSON) b $
144− addToAccept (Proxy :: Proxy PlainText ) c ""
152+ addToAccept (Proxy :: Proxy JSON) b $
153+ addToAccept (Proxy :: Proxy PlainText ) c $
154+ ""
145155 let val a b c i = handleAcceptH (Proxy :: Proxy '[OctetStream, JSON, PlainText])
146156 (acceptH a b c) (i :: Int)
147− property $ \a b c i -> fst (fromJust $ val a b c i) == fst (highest a b c)
157+ property $ \a b c i ->
158+ let acc = acceptH a b c
159+ in counterexample (show acc) $
160+ fst (fromJust $ val a b c i) === fst (highest a b c)
148161
149162 describe "handleCTypeH" $ do
150163