git.iko.soy/typeable/servant
on 2261542 help sign in
46 files changed+582−299
since splitsnapshots
unifiedsplit
.hlint.yaml+51 .travis.yml+242−123 cabal.haskell-ci+13−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 hlint.yaml−65 servant-client-core/servant-client-core.cabal+8−6 servant-client-ghcjs/servant-client-ghcjs.cabal+1−1 servant-client/CHANGELOG.md+5 servant-client/servant-client.cabal+9−8 servant-client/src/Servant/Client/Internal/HttpClient.hs+7−3 servant-conduit/servant-conduit.cabal+4−3 servant-docs/CHANGELOG.md+5 servant-docs/servant-docs.cabal+9−9 servant-docs/src/Servant/Docs/Internal.hs+9−8 servant-foreign/servant-foreign.cabal+6−5 servant-http-streams/CHANGELOG.md+5 servant-http-streams/servant-http-streams.cabal+9−7 servant-http-streams/src/Servant/HttpStreams/Internal.hs+7−1 servant-machines/servant-machines.cabal+5−4 servant-pipes/CHANGELOG.md+7 servant-pipes/servant-pipes.cabal+4−4 servant-pipes/src/Servant/Pipes.hs+1−1 servant-server/CHANGELOG.md+14 servant-server/servant-server.cabal+12−10 servant/CHANGELOG.md+23 servant/servant.cabal+12−9 servant/src/Servant/API/Experimental/Auth.hs−1 servant/src/Servant/Types/SourceT.hs+32 servant/test/Servant/API/ContentTypesSpec.hs+18−5
.hlint.yamlnew file+51
@@ -0,0 +1,51 @@
1+# Control which extensions/flags/modules/functions can be used
2+#
3+- extensions:
4+ - default: false # all extension are banned by default
5+ - name:
6+ - CPP
7+ - DataKinds
8+ - DeriveDataTypeable
9+ - DeriveFoldable
10+ - DeriveFunctor
11+ - DeriveGeneric
12+ - DeriveTraversable
13+ - FlexibleContexts
14+ - FlexibleInstances
15+ - FunctionalDependencies
16+ - GADTs
17+ - KindSignatures
18+ - MultiParamTypeClasses
19+ - OverloadedStrings
20+ - PolyKinds
21+ - RankNTypes
22+ - ScopedTypeVariables
23+ - TypeFamilies
24+ - TypeOperators
25+ - UndecidableInstances
26+
27+- modules:
28+ - {name: [Data.Set], as: Set}
29+ - {name: Control.Arrow, within: []} # Certain modules are banned entirely
30+
31+- functions:
32+ - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
33+
34+# Turn on hints that are off by default
35+#
36+# Ban "module X(module X) where", to require a real export list
37+- warn: {name: Use explicit module export list}
38+
39+# Ignore some builtin hints
40+- ignore: {name: Redundant do}
41+- ignore: {name: Parse error}
42+- ignore: {name: Use fmap}
43+- ignore: {name: "Use <$>"}
44+- ignore: {name: Use list comprehension}
45+- ignore: {name: Use lambda-case}
46+- ignore: {name: Eta reduce}
47+
48+# Add custom hints for this project
49+#
50+# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
51+# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
.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+13−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,15 @@ 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+constraint-set base-compat-0.10
25+ constraints: base-compat ==0.10.*
26+
27+constraint-set base-compat-0.11
28+ constraints: base-compat ==0.11.*
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,15 @@ 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:base-compat,
50+ servant-js:lens
51+
4352allow-newer:
4453-- servant-pagination:servant, servant-pagination:servant-server,
4554-- servant-multipart:servant, servant-multipart:servant-server,
@@ -48,6 +57,35 @@ allow-newer:
4857
4958-- servant-quickcheck
5059allow-newer:
51− servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,
60+ servant-quickcheck:base,
61+ servant-quickcheck:base-compat,
5262 servant-quickcheck:hspec,
53− servant-quickcheck:http-client
63+ servant-quickcheck:http-client,
64+ servant-quickcheck:http-media,
65+ servant-quickcheck:QuickCheck,
66+ servant-quickcheck:servant,
67+ servant-quickcheck:servant-client,
68+ servant-quickcheck:servant-server,
69+ servant-quickcheck:time,
70+ servant-quickcheck:warp
71+
72+allow-newer: aeson-pretty:base-compat
73+
74+
75+-- constraints: semigroups ^>=0.19
76+-- constraints: hashable ^>=1.3
77+-- constraints: network ^>=3.1
78+-- constraints: machines ^>=0.7
79+-- constraints: http-media ^>=0.8
80+
81+allow-newer: vault-0.3.1.2:hashable
82+allow-newer: psqueues-0.2.7.1:hashable
83+allow-newer: sqlite-simple-0.4.16.0:semigroups
84+allow-newer: direct-sqlite-2.3.24:semigroups
85+allow-newer: io-streams-1.5.1.0:network
86+allow-newer: io-streams:primitive
87+allow-newer: openssl-streams-1.2.2.0:network
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
hlint.yamldeleted−65
@@ -1,65 +0,0 @@
1−# HLint configuration file
2−# https://github.com/ndmitchell/hlint
3−##########################
4−
5−# This file contains a template configuration file, which is typically
6−# placed as .hlint.yaml in the root of your project
7−
8−
9−# Specify additional command line arguments
10−#
11−# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
12−
13−
14−# Control which extensions/flags/modules/functions can be used
15−#
16−# - extensions:
17−# - default: false # all extension are banned by default
18−# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
19−# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
20−#
21−# - flags:
22−# - {name: -w, within: []} # -w is allowed nowhere
23−#
24−# - modules:
25−# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
26−# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
27−#
28−# - functions:
29−# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
30−
31−
32−# Add custom hints for this project
33−#
34−# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
35−# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
36−
37−
38−# Turn on hints that are off by default
39−#
40−# Ban "module X(module X) where", to require a real export list
41−# - warn: {name: Use explicit module export list}
42−#
43−# Replace a $ b $ c with a . b $ c
44−# - group: {name: dollar, enabled: true}
45−#
46−# Generalise map to fmap, ++ to <>
47−# - group: {name: generalise, enabled: true}
48−
49−
50−# Ignore some builtin hints
51−- ignore: {name: Redundant do}
52−- ignore: {name: Parse error}
53−- ignore: {name: Use fmap}
54−- ignore: {name: Use list comprehension}
55−- ignore: {name: Use lambda-case}
56−- ignore: {name: Eta reduce}
57−# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
58−
59−
60−# Define some custom infix operators
61−# - fixity: infixr 3 ~^#^~
62−
63−
64−# To generate a suitable file for HLint do:
65−# $ hlint --default > .hlint.yaml
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: 2
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/CHANGELOG.md+5
@@ -1,6 +1,11 @@
11[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client/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.0.1
5+--------
6+
7+- Allow `base-compat-0.11`
8+
490.16
510----
611
servant-client/servant-client.cabal+9−8
@@ -1,6 +1,6 @@
11cabal-version: >=1.10
22name: servant-client
3−version: 0.16
3+version: 0.16.0.1
44
55synopsis: Automatic derivation of querying functions for servant
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
@@ -44,14 +45,14 @@ library
4445 -- Bundled with GHC: Lower bound to not force re-installs
4546 -- text and mtl are bundled starting with GHC-8.4
4647 build-depends:
47− base >= 4.9 && < 4.13
48+ base >= 4.9 && < 4.14
4849 , bytestring >= 0.10.8.1 && < 0.11
4950 , containers >= 0.5.7.1 && < 0.7
5051 , deepseq >= 1.4.2.0 && < 1.5
5152 , mtl >= 2.2.2 && < 2.3
5253 , stm >= 2.4.5.1 && < 2.6
5354 , text >= 1.2.3.0 && < 1.3
54− , time >= 1.6.0.1 && < 1.9
55+ , time >= 1.6.0.1 && < 1.10
5556 , transformers >= 0.5.2.0 && < 0.6
5657
5758 if !impl(ghc >= 8.2)
@@ -67,9 +68,9 @@ library
6768 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
6869 -- Here can be exceptions if we really need features from the newer versions.
6970 build-depends:
70− base-compat >= 0.10.5 && < 0.11
71+ base-compat >= 0.10.5 && < 0.12
7172 , http-client >= 0.5.13.1 && < 0.7
72− , http-media >= 0.7.1.3 && < 0.8
73+ , http-media >= 0.7.1.3 && < 0.9
7374 , http-types >= 0.12.2 && < 0.13
7475 , exceptions >= 0.10.0 && < 0.11
7576 , kan-extensions >= 5.2 && < 5.3
@@ -117,8 +118,8 @@ test-suite spec
117118 entropy >= 0.4.1.3 && < 0.5
118119 , hspec >= 2.6.0 && < 2.8
119120 , HUnit >= 1.6.0.0 && < 1.7
120− , network >= 2.8.0.0 && < 3.1
121− , QuickCheck >= 2.12.6.1 && < 2.13
121+ , network >= 2.8.0.0 && < 3.2
122+ , QuickCheck >= 2.12.6.1 && < 2.14
122123 , servant == 0.16.*
123124 , servant-server == 0.16.*
124125 , tdigest >= 0.2 && < 0.3
servant-client/src/Servant/Client/Internal/HttpClient.hs+7−3
@@ -16,10 +16,11 @@ import Prelude.Compat
1616
1717import Control.Concurrent.MVar
1818 (modifyMVar, newMVar)
19−import qualified Data.ByteString as BS
2019import Control.Concurrent.STM.TVar
2120import Control.Exception
21+ (SomeException (..), catch)
2222import Control.Monad
23+ (unless)
2324import Control.Monad.Base
2425 (MonadBase (..))
2526import Control.Monad.Catch
@@ -27,15 +28,18 @@ import Control.Monad.Catch
2728import Control.Monad.Error.Class
2829 (MonadError (..))
2930import Control.Monad.IO.Class
30− (liftIO)
31+ (MonadIO (..))
3132import Control.Monad.Reader
33+ (MonadReader, ReaderT, ask, runReaderT)
3234import Control.Monad.STM
3335 (STM, atomically)
3436import Control.Monad.Trans.Control
3537 (MonadBaseControl (..))
3638import Control.Monad.Trans.Except
39+ (ExceptT, runExceptT)
3740import Data.Bifunctor
3841 (bimap)
42+import qualified Data.ByteString as BS
3943import Data.ByteString.Builder
4044 (toLazyByteString)
4145import qualified Data.ByteString.Lazy as BSL
@@ -64,8 +68,8 @@ import Network.HTTP.Types
6468 (hContentType, renderQuery, statusCode)
6569import Servant.Client.Core
6670
67−import qualified Servant.Types.SourceT as S
6871import qualified Network.HTTP.Client as Client
72+import qualified Servant.Types.SourceT as S
6973
7074-- | The environment in which a request is run.
7175data ClientEnv
servant-conduit/servant-conduit.cabal+4−3
@@ -1,7 +1,7 @@
11cabal-version: >=1.10
22name: servant-conduit
33version: 0.15
4−x-revision: 1
4+x-revision: 2
55
66synopsis: Servant Stream support for conduit.
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
@@ -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/CHANGELOG.md+5
@@ -1,6 +1,11 @@
11[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-docs/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.11.4
5+------
6+
7+- Drop dependency on `control-monad-omega` in favor of `Data.Universe.Helpers` from `universe-base`.
8+
490.11.3
510------
611
servant-docs/servant-docs.cabal+9−9
@@ -1,7 +1,6 @@
11cabal-version: >=1.10
22name: servant-docs
3−version: 0.11.3
4−x-revision: 1
3+version: 0.11.4
54
65synopsis: generate API docs for your servant webservice
76category: Servant, Web
@@ -24,7 +23,8 @@ tested-with:
2423 GHC ==8.0.2
2524 || ==8.2.2
2625 || ==8.4.4
27− || ==8.6.4
26+ || ==8.6.5
27+ || ==8.8.1
2828
2929extra-source-files:
3030 CHANGELOG.md
@@ -46,7 +46,7 @@ library
4646 --
4747 -- note: mtl lower bound is so low because of GHC-7.8
4848 build-depends:
49− base >= 4.9 && < 4.13
49+ base >= 4.9 && < 4.14
5050 , bytestring >= 0.10.8.1 && < 0.11
5151 , text >= 1.2.3.0 && < 1.3
5252
@@ -59,14 +59,14 @@ library
5959 build-depends:
6060 aeson >= 1.4.1.0 && < 1.5
6161 , aeson-pretty >= 0.8.5 && < 0.9
62− , base-compat >= 0.10.5 && < 0.11
62+ , base-compat >= 0.10.5 && < 0.12
6363 , case-insensitive >= 1.2.0.11 && < 1.3
64− , 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
64+ , hashable >= 1.2.7.0 && < 1.4
65+ , http-media >= 0.7.1.3 && < 0.9
6766 , http-types >= 0.12.2 && < 0.13
68− , lens >= 4.17 && < 4.18
67+ , lens >= 4.17 && < 4.19
6968 , string-conversions >= 0.4.0.1 && < 0.5
69+ , universe-base >= 1.1.1 && < 1.2
7070 , unordered-containers >= 0.2.9.0 && < 0.3
7171
7272 hs-source-dirs: src
servant-docs/src/Servant/Docs/Internal.hs+9−8
@@ -27,7 +27,6 @@ import Control.Arrow
2727import Control.Lens
2828 (makeLenses, mapped, over, traversed, view, (%~), (&), (.~),
2929 (<>~), (^.), (|>))
30−import qualified Control.Monad.Omega as Omega
3130import qualified Data.ByteString.Char8 as BSC
3231import Data.ByteString.Lazy.Char8
3332 (ByteString)
@@ -65,6 +64,8 @@ import Servant.API
6564import Servant.API.ContentTypes
6665import Servant.API.TypeLevel
6766
67+import qualified Data.Universe.Helpers as U
68+
6869import qualified Data.HashMap.Strict as HM
6970import qualified Data.Text as T
7071import qualified Network.HTTP.Media as M
@@ -479,22 +480,22 @@ samples = map ("",)
479480
480481-- | Default sample Generic-based inputs/outputs.
481482defaultSamples :: forall a. (Generic a, GToSample (Rep a)) => Proxy a -> [(Text, a)]
482−defaultSamples _ = Omega.runOmega $ second to <$> gtoSamples (Proxy :: Proxy (Rep a))
483+defaultSamples _ = second to <$> gtoSamples (Proxy :: Proxy (Rep a))
483484
484485-- | @'ToSample'@ for Generics.
485486--
486−-- The use of @'Omega'@ allows for more productive sample generation.
487+-- Note: we use combinators from "Universe.Data.Helpers" for more productive sample generation.
487488class GToSample t where
488− gtoSamples :: proxy t -> Omega.Omega (Text, t x)
489+ gtoSamples :: proxy t -> [(Text, t x)]
489490
490491instance GToSample U1 where
491− gtoSamples _ = Omega.each (singleSample U1)
492+ gtoSamples _ = singleSample U1
492493
493494instance GToSample V1 where
494495 gtoSamples _ = empty
495496
496497instance (GToSample p, GToSample q) => GToSample (p :*: q) where
497− gtoSamples _ = render <$> ps <*> qs
498+ gtoSamples _ = U.cartesianProduct render ps qs
498499 where
499500 ps = gtoSamples (Proxy :: Proxy p)
500501 qs = gtoSamples (Proxy :: Proxy q)
@@ -503,13 +504,13 @@ instance (GToSample p, GToSample q) => GToSample (p :*: q) where
503504 | otherwise = (ta <> ", " <> tb, a :*: b)
504505
505506instance (GToSample p, GToSample q) => GToSample (p :+: q) where
506− gtoSamples _ = lefts <|> rights
507+ gtoSamples _ = lefts U.+++ rights
507508 where
508509 lefts = second L1 <$> gtoSamples (Proxy :: Proxy p)
509510 rights = second R1 <$> gtoSamples (Proxy :: Proxy q)
510511
511512instance ToSample a => GToSample (K1 i a) where
512− gtoSamples _ = second K1 <$> Omega.each (toSamples (Proxy :: Proxy a))
513+ gtoSamples _ = second K1 <$> toSamples (Proxy :: Proxy a)
513514
514515instance (GToSample f) => GToSample (M1 i a f) where
515516 gtoSamples _ = second M1 <$> gtoSamples (Proxy :: Proxy f)
servant-foreign/servant-foreign.cabal+6−5
@@ -1,7 +1,7 @@
11cabal-version: >=1.10
22name: servant-foreign
33version: 0.15
4−x-revision: 1
4+x-revision: 2
55
66synopsis: Helpers for generating clients for servant APIs in any programming language
77category: Servant, Web
@@ -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/CHANGELOG.md+5
@@ -1,6 +1,11 @@
11 [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-http-streams/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.0.1
5+--------
6+
7+- Allow `base-compat-0.11`
8+
490.16
510----
611
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-http-streams/src/Servant/HttpStreams/Internal.hs+7−1
@@ -18,6 +18,8 @@ import Control.DeepSeq
1818 (NFData, force)
1919import Control.Exception
2020 (IOException, SomeException (..), catch, evaluate, throwIO)
21+import Control.Monad
22+ (unless)
2123import Control.Monad.Base
2224 (MonadBase (..))
2325import Control.Monad.Codensity
@@ -25,9 +27,13 @@ import Control.Monad.Codensity
2527import Control.Monad.Error.Class
2628 (MonadError (..))
2729import Control.Monad.IO.Class
28− (liftIO)
30+ (MonadIO (..))
2931import Control.Monad.Reader
32+ (MonadReader, ReaderT, ask, runReaderT)
33+import Control.Monad.Trans.Class
34+ (lift)
3035import Control.Monad.Trans.Except
36+ (ExceptT, runExceptT)
3137import Data.Bifunctor
3238 (bimap, first)
3339import Data.ByteString.Builder
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: 3
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/CHANGELOG.md+7
@@ -1,3 +1,10 @@
1+0.15.1
2+------
3+
4+- `FromSourceIO Proxy` (`ListT`) instance `fail`s in `IO`, not in `m`.
5+ This works around `MonadFail` proposal, and makes `servant-pipes`
6+ behave like `servant-conduit` and `servant-machines`.
7+
180.15
29----
310
servant-pipes/servant-pipes.cabal+4−4
@@ -1,7 +1,6 @@
11cabal-version: >=1.10
22name: servant-pipes
3−version: 0.15
4−x-revision: 1
3+version: 0.15.1
54
65synopsis: Servant Stream support for pipes
76category: Servant, Web, Pipes
@@ -21,7 +20,8 @@ tested-with:
2120 GHC ==8.0.2
2221 || ==8.2.2
2322 || ==8.4.4
24− || ==8.6.4
23+ || ==8.6.5
24+ || ==8.8.1
2525
2626extra-source-files:
2727 CHANGELOG.md
@@ -63,6 +63,6 @@ test-suite example
6363 , servant-server >=0.15 && <0.17
6464 , servant-client >=0.15 && <0.17
6565 , wai >=3.2.1.2 && <3.3
66− , warp >=3.2.25 && <3.3
66+ , warp >=3.2.25 && <3.4
6767 , http-client
6868 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+12−10
@@ -1,6 +1,7 @@
11cabal-version: >=1.10
22name: servant-server
3−version: 0.16
3+version: 0.16.2
4+x-revision: 1
45
56synopsis: A family of combinators for defining webservices APIs and serving them
67category: Servant, Web
@@ -27,7 +28,8 @@ tested-with:
2728 GHC ==8.0.2
2829 || ==8.2.2
2930 || ==8.4.4
30− || ==8.6.4
31+ || ==8.6.5
32+ || ==8.8.1
3133
3234extra-source-files:
3335 CHANGELOG.md
@@ -68,7 +70,7 @@ library
6870 -- Bundled with GHC: Lower bound to not force re-installs
6971 -- text and mtl are bundled starting with GHC-8.4
7072 build-depends:
71− base >= 4.9 && < 4.13
73+ base >= 4.9 && < 4.14
7274 , bytestring >= 0.10.8.1 && < 0.11
7375 , containers >= 0.5.7.1 && < 0.7
7476 , mtl >= 2.2.2 && < 2.3
@@ -79,20 +81,20 @@ library
7981 -- Servant dependencies
8082 -- strict dependency as we re-export 'servant' things.
8183 build-depends:
82− servant >= 0.16 && < 0.17.1
83− , http-api-data >= 0.4 && < 0.4.1
84+ servant >= 0.16.2 && < 0.16.3
85+ , http-api-data >= 0.4.1 && < 0.4.2
8486
8587 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
8688 -- Here can be exceptions if we really need features from the newer versions.
8789 build-depends:
88− base-compat >= 0.10.5 && < 0.11
90+ base-compat >= 0.10.5 && < 0.12
8991 , base64-bytestring >= 1.0.0.1 && < 1.1
9092 , exceptions >= 0.10.0 && < 0.11
91− , http-media >= 0.7.1.3 && < 0.8
93+ , http-media >= 0.7.1.3 && < 0.9
9294 , http-types >= 0.12.2 && < 0.13
9395 , network-uri >= 2.6.1.0 && < 2.8
9496 , monad-control >= 1.0.2.3 && < 1.1
95− , network >= 2.8 && < 3.1
97+ , network >= 2.8 && < 3.2
9698 , string-conversions >= 0.4.0.1 && < 0.5
9799 , resourcet >= 1.2.2 && < 1.3
98100 , tagged >= 0.8.6 && < 0.9
@@ -120,7 +122,7 @@ executable greet
120122
121123 build-depends:
122124 aeson >= 1.4.1.0 && < 1.5
123− , warp >= 3.2.25 && < 3.3
125+ , warp >= 3.2.25 && < 3.4
124126
125127test-suite spec
126128 type: exitcode-stdio-1.0
@@ -165,7 +167,7 @@ test-suite spec
165167 , directory >= 1.3.0.0 && < 1.4
166168 , hspec >= 2.6.0 && < 2.8
167169 , hspec-wai >= 0.9.0 && < 0.10
168− , QuickCheck >= 2.12.6.1 && < 2.13
170+ , QuickCheck >= 2.12.6.1 && < 2.14
169171 , should-not-typecheck >= 2.1.0 && < 2.2
170172 , temporary >= 1.3 && < 1.4
171173 , 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+12−9
@@ -1,6 +1,7 @@
11cabal-version: >=1.10
22name: servant
3−version: 0.16
3+version: 0.16.2
4+x-revision: 1
45
56synopsis: A family of combinators for defining webservices APIs
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
@@ -88,7 +90,7 @@ library
8890 --
8991 -- note: mtl lower bound is so low because of GHC-7.8
9092 build-depends:
91− base >= 4.9 && < 4.13
93+ base >= 4.9 && < 4.14
9294 , bytestring >= 0.10.8.1 && < 0.11
9395 , mtl >= 2.2.2 && < 2.3
9496 , transformers >= 0.5.2.0 && < 0.6
@@ -98,23 +100,23 @@ library
98100 -- We depend (heavily) on the API of these packages:
99101 -- i.e. re-export, or allow using without direct dependency
100102 build-depends:
101− http-api-data >= 0.4 && < 0.4.1
102− , singleton-bool >= 0.1.4 && < 0.1.5
103+ http-api-data >= 0.4.1 && < 0.4.2
104+ , singleton-bool >= 0.1.5 && < 0.1.6
103105
104106 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
105107 -- Here can be exceptions if we really need features from the newer versions.
106108 build-depends:
107− base-compat >= 0.10.5 && < 0.11
109+ base-compat >= 0.10.5 && < 0.12
108110 , aeson >= 1.4.1.0 && < 1.5
109111 , attoparsec >= 0.13.2.2 && < 0.14
110112 , bifunctors >= 5.5.3 && < 5.6
111113 , case-insensitive >= 1.2.0.11 && < 1.3
112114 , deepseq >= 1.4.2.0 && < 1.5
113− , http-media >= 0.7.1.3 && < 0.8
115+ , http-media >= 0.7.1.3 && < 0.9
114116 , http-types >= 0.12.2 && < 0.13
115117 , mmorph >= 1.1.2 && < 1.2
116118 , network-uri >= 2.6.1.0 && < 2.7
117− , QuickCheck >= 2.12.6.1 && <2.13
119+ , QuickCheck >= 2.12.6.1 && < 2.14
118120 , string-conversions >= 0.4.0.1 && < 0.5
119121 , tagged >= 0.8.6 && < 0.9
120122 , vault >= 0.3.1.2 && < 0.4
@@ -161,6 +163,7 @@ test-suite spec
161163 , base-compat
162164 , aeson
163165 , bytestring
166+ , http-media
164167 , mtl
165168 , servant
166169 , string-conversions
@@ -170,7 +173,7 @@ test-suite spec
170173 -- Additonal dependencies
171174 build-depends:
172175 hspec >= 2.6.0 && < 2.8
173− , QuickCheck >= 2.12.6.1 && < 2.13
176+ , QuickCheck >= 2.12.6.1 && < 2.14
174177 , quickcheck-instances >= 0.3.19 && < 0.4
175178
176179 build-tool-depends:
servant/src/Servant/API/Experimental/Auth.hs−1
@@ -1,6 +1,5 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE DeriveDataTypeable #-}
3−{-# LANGUAGE KindSignatures #-}
43{-# LANGUAGE PolyKinds #-}
54module Servant.API.Experimental.Auth where
65
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