git.iko.soy/typeable/servant
on master help sign in
Merge pull request #985 from phadej/forward-port
77ea599Oleg Grenrus
.travis.yml+29−10
@@ -64,17 +64,21 @@ install:
64 - BENCH=${BENCH---enable-benchmarks}
64 - BENCH=${BENCH---enable-benchmarks}
65 - TEST=${TEST---enable-tests}
65 - TEST=${TEST---enable-tests}
66 - HADDOCK=${HADDOCK-true}
66 - HADDOCK=${HADDOCK-true}
67− - INSTALLED=${INSTALLED-true}
67+ - UNCONSTRAINED=${UNCONSTRAINED-true}
68+ - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
68 - GHCHEAD=${GHCHEAD-false}
69 - GHCHEAD=${GHCHEAD-false}
69 - travis_retry cabal update -v
70 - travis_retry cabal update -v
70 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
71 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
71 - rm -fv cabal.project cabal.project.local
72 - rm -fv cabal.project cabal.project.local
72 - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
73 - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
73 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
74 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
74− - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/basic-auth\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/https\" \"doc/cookbook/pagination\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\"\\n' > cabal.project"
75+ - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/basic-auth\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/file-upload\" \"doc/cookbook/https\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/pagination\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\"\\n' > cabal.project"
75 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
76 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
76− - "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base, servant-js:servant,servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
77+ - "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
78+ - touch cabal.project.local
79+ - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
80+ - cat cabal.project || true
77− - cat cabal.project
81+ - cat cabal.project.local || true
78 - if [ -f "servant/configure.ac" ]; then
82 - if [ -f "servant/configure.ac" ]; then
79 (cd "servant" && autoreconf -i);
83 (cd "servant" && autoreconf -i);
80 fi
84 fi
@@ -105,9 +109,15 @@ install:
105 - if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
109 - if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
106 (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
110 (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
107 fi
111 fi
112+ - if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
113+ (cd "doc/cookbook/file-upload" && autoreconf -i);
114+ fi
108 - if [ -f "doc/cookbook/https/configure.ac" ]; then
115 - if [ -f "doc/cookbook/https/configure.ac" ]; then
109 (cd "doc/cookbook/https" && autoreconf -i);
116 (cd "doc/cookbook/https" && autoreconf -i);
110 fi
117 fi
118+ - if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
119+ (cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
120+ fi
111 - if [ -f "doc/cookbook/pagination/configure.ac" ]; then
121 - if [ -f "doc/cookbook/pagination/configure.ac" ]; then
112 (cd "doc/cookbook/pagination" && autoreconf -i);
122 (cd "doc/cookbook/pagination" && autoreconf -i);
113 fi
123 fi
@@ -118,7 +128,7 @@ install:
118 (cd "doc/cookbook/using-custom-monad" && autoreconf -i);
128 (cd "doc/cookbook/using-custom-monad" && autoreconf -i);
119 fi
129 fi
120 - rm -f cabal.project.freeze
130 - rm -f cabal.project.freeze
121− - rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/https"/dist "doc/cookbook/pagination"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist
131+ - rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/file-upload"/dist "doc/cookbook/https"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/pagination"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist
122 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
132 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
123
133
124# Here starts the actual work to be performed for the package under test;
134# Here starts the actual work to be performed for the package under test;
@@ -136,22 +146,26 @@ script:
136 - (cd "doc/cookbook/basic-auth" && cabal sdist)
146 - (cd "doc/cookbook/basic-auth" && cabal sdist)
137 - (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
147 - (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
138 - (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
148 - (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
149+ - (cd "doc/cookbook/file-upload" && cabal sdist)
139 - (cd "doc/cookbook/https" && cabal sdist)
150 - (cd "doc/cookbook/https" && cabal sdist)
151+ - (cd "doc/cookbook/jwt-and-basic-auth" && cabal sdist)
140 - (cd "doc/cookbook/pagination" && cabal sdist)
152 - (cd "doc/cookbook/pagination" && cabal sdist)
141 - (cd "doc/cookbook/structuring-apis" && cabal sdist)
153 - (cd "doc/cookbook/structuring-apis" && cabal sdist)
142 - (cd "doc/cookbook/using-custom-monad" && cabal sdist)
154 - (cd "doc/cookbook/using-custom-monad" && cabal sdist)
143 - echo -en 'travis_fold:end:sdist\\r'
155 - echo -en 'travis_fold:end:sdist\\r'
144 - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
156 - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
145− - mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/pagination"/dist/cookbook-pagination-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz ${DISTDIR}/
157+ - mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/jwt-and-basic-auth"/dist/cookbook-jwt-and-basic-auth-*.tar.gz "doc/cookbook/pagination"/dist/cookbook-pagination-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz ${DISTDIR}/
146 - cd ${DISTDIR} || false
158 - cd ${DISTDIR} || false
147 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
159 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
148− - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-https-*/*.cabal cookbook-pagination-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal\\n' > cabal.project"
160+ - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-file-upload-*/*.cabal cookbook-https-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-pagination-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal\\n' > cabal.project"
149 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
161 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
150− - "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base, servant-js:servant,servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
162+ - "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
163+ - touch cabal.project.local
164+ - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
165+ - cat cabal.project || true
151− - cat cabal.project
166+ - cat cabal.project.local || true
152 - echo -en 'travis_fold:end:unpack\\r'
167 - echo -en 'travis_fold:end:unpack\\r'
153
168
154−
155 - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
169 - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
156 # build & run tests, build benchmarks
170 # build & run tests, build benchmarks
157 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
171 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
@@ -164,5 +178,10 @@ script:
164 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
178 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
165
179
166 - echo -en 'travis_fold:end:haddock\\r'
180 - echo -en 'travis_fold:end:haddock\\r'
181+ - echo Building without installed constraints for packages in global-db... && echo -en 'travis_fold:start:build-installed\\r'
182+ # Build without installed constraints for packages in global-db
183+ - if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
184+
185+ - echo -en 'travis_fold:end:build-installed\\r'
167# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
186# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
168# EOF
187# EOF
cabal.make-travis-yml−1
@@ -6,7 +6,6 @@ install-dependencies-step: False
6
6
7-- this speed-ups the build a little, but we have to check these for release
7-- this speed-ups the build a little, but we have to check these for release
8no-tests-no-benchmarks: False
8no-tests-no-benchmarks: False
9−build-with-installed-step: False
10
9
11-- Don't run cabal check, as cookbook examples won't pass it
10-- Don't run cabal check, as cookbook examples won't pass it
12cabal-check: False
11cabal-check: False
cabal.project+2−8
@@ -11,11 +11,9 @@ packages: servant/
11 doc/cookbook/basic-auth
11 doc/cookbook/basic-auth
12 doc/cookbook/db-postgres-pool
12 doc/cookbook/db-postgres-pool
13 doc/cookbook/db-sqlite-simple
13 doc/cookbook/db-sqlite-simple
14− -- MkLink changed
15− -- doc/cookbook/file-upload
14+ doc/cookbook/file-upload
16 doc/cookbook/https
15 doc/cookbook/https
17− -- servant-auth-* doesn't support GHC-8.4
18− -- doc/cookbook/jwt-and-basic-auth
16+ doc/cookbook/jwt-and-basic-auth
19 doc/cookbook/pagination
17 doc/cookbook/pagination
20 doc/cookbook/structuring-apis
18 doc/cookbook/structuring-apis
21 doc/cookbook/using-custom-monad
19 doc/cookbook/using-custom-monad
@@ -30,9 +28,5 @@ constraints:
30 memory <0.14.12 || >0.14.12
28 memory <0.14.12 || >0.14.12
31
29
32allow-newer:
30allow-newer:
33− http-media:base
34−
35−allow-newer:
36− servant-js:servant,
37 servant-pagination:servant,
31 servant-pagination:servant,
38 servant-pagination:servant-server
32 servant-pagination:servant-server
servant-client-core/CHANGELOG.md+42−2
@@ -4,10 +4,50 @@
40.14
40.14
5----
5----
6
6
7−- Add a `hoistClientMonad` method to the `HasClient` typeclass, for
7+- `Stream` takes a status code argument
8+
9+ ```diff
10+ -Stream method framing ctype a
11+ +Stream method status framing ctype a
12+ ```
13+
14+ ([#966](https://github.com/haskell-servant/servant/pull/966)
15+ [#972](https://github.com/haskell-servant/servant/pull/972))
16+
17+- `ToStreamGenerator` definition changed, so it's possible to write an instance
18+ for conduits.
19+
20+ ```diff
21+ -class ToStreamGenerator f a where
22+ - toStreamGenerator :: f a -> StreamGenerator a
23+ +class ToStreamGenerator a b | a -> b where
24+ + toStreamGenerator :: a -> StreamGenerator b
25+ ```
26+
27+ ([#959](https://github.com/haskell-servant/servant/pull/959))
28+
29+- Added `NoFraming` streaming strategy
30+ ([#959](https://github.com/haskell-servant/servant/pull/959))
31+
32+- *servant-client-core* Free `Client` implementation.
33+ Useful for testing `HasClient` instances.
34+ ([#920](https://github.com/haskell-servant/servant/pull/920))
35+
36+- *servant-client-core* Add `hoistClient` to `HasClient`.
37+ Just like `hoistServer` allows us to change the monad in which request handlers
38+ of a web application live in, we also have `hoistClient` for changing the monad
8− changing the monad in which client functions run.
39+ in which *client functions* live.
40+ Read [tutorial section for more information](https://haskell-servant.readthedocs.io/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
9 ([#936](https://github.com/haskell-servant/servant/pull/936))
41 ([#936](https://github.com/haskell-servant/servant/pull/936))
10
42
43+ iF you have own combinators, you'll need to define a new method of
44+ `HasClient` class, for example:
45+
46+ ```haskell
47+ type Client m (MyCombinator :> api) = MyValue :> Client m api
48+ hoistClientMonad pm _ nt cl = hoistClientMonad pm (Proxy :: Proxy api) nt . cl
49+ ```
50+
110.13.0.1
510.13.0.1
12--------
52--------
13
53
servant-client-core/servant-client-core.cabal+12−13
@@ -51,12 +51,11 @@ library
51 base >= 4.7 && < 4.12
51 base >= 4.7 && < 4.12
52 , bytestring >= 0.10.4.0 && < 0.11
52 , bytestring >= 0.10.4.0 && < 0.11
53 , containers >= 0.5.5.1 && < 0.6
53 , containers >= 0.5.5.1 && < 0.6
54− , mtl >= 2.1 && < 2.3
55 , text >= 1.2.3.0 && < 1.3
54 , text >= 1.2.3.0 && < 1.3
56
55
57 if !impl(ghc >= 8.0)
56 if !impl(ghc >= 8.0)
58 build-depends:
57 build-depends:
59− semigroups >=0.18.3 && <0.19
58+ semigroups >=0.18.4 && <0.19
60
59
61 -- Servant dependencies
60 -- Servant dependencies
62 build-depends:
61 build-depends:
@@ -65,16 +64,16 @@ library
65 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
64 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
66 -- Here can be exceptions if we really need features from the newer versions.
65 -- Here can be exceptions if we really need features from the newer versions.
67 build-depends:
66 build-depends:
68− base-compat >= 0.9.3 && < 0.11
67+ base-compat >= 0.10.1 && < 0.11
69 , base64-bytestring >= 1.0.0.1 && < 1.1
68 , base64-bytestring >= 1.0.0.1 && < 1.1
70− , exceptions >= 0.8.3 && < 0.11
69+ , exceptions >= 0.10.0 && < 0.11
71− , free >= 5.0.1 && < 5.1
70+ , free >= 5.0.2 && < 5.1
72− , generics-sop >= 0.3.1.0 && < 0.4
71+ , generics-sop >= 0.3.2.0 && < 0.4
73− , http-api-data >= 0.3.7.1 && < 0.4
72+ , http-api-data >= 0.3.8.1 && < 0.4
74− , http-media >= 0.7.1.1 && < 0.8
73+ , http-media >= 0.7.1.2 && < 0.8
75− , http-types >= 0.12 && < 0.13
74+ , http-types >= 0.12.1 && < 0.13
76 , network-uri >= 2.6.1.0 && < 2.7
75 , network-uri >= 2.6.1.0 && < 2.7
77− , safe >= 0.3.15 && < 0.4
76+ , safe >= 0.3.17 && < 0.4
78
77
79 hs-source-dirs: src
78 hs-source-dirs: src
80 default-language: Haskell2010
79 default-language: Haskell2010
@@ -99,8 +98,8 @@ test-suite spec
99 -- Additonal dependencies
98 -- Additonal dependencies
100 build-depends:
99 build-depends:
101 deepseq >= 1.3.0.2 && <1.5
100 deepseq >= 1.3.0.2 && <1.5
102− , hspec >= 2.4.4 && <2.6
101+ , hspec >= 2.4.1 && <2.6
103− , QuickCheck >= 2.10.1 && < 2.12
102+ , QuickCheck >= 2.11.3 && < 2.12
104
103
105 build-tool-depends:
104 build-tool-depends:
106− hspec-discover:hspec-discover >= 2.4.4 && <2.6
105+ hspec-discover:hspec-discover >= 2.5.1 && <2.6
servant-client/CHANGELOG.md+37−2
@@ -4,10 +4,45 @@
40.14
40.14
5----
5----
6
6
7−- Add `hoistClient` for changing the monad in which
7+- `Stream` takes a status code argument
8+
9+ ```diff
10+ -Stream method framing ctype a
11+ +Stream method status framing ctype a
12+ ```
13+
14+ ([#966](https://github.com/haskell-servant/servant/pull/966)
15+ [#972](https://github.com/haskell-servant/servant/pull/972))
16+
17+- `ToStreamGenerator` definition changed, so it's possible to write an instance
18+ for conduits.
19+
20+ ```diff
21+ -class ToStreamGenerator f a where
22+ - toStreamGenerator :: f a -> StreamGenerator a
23+ +class ToStreamGenerator a b | a -> b where
24+ + toStreamGenerator :: a -> StreamGenerator b
25+ ```
26+
27+ ([#959](https://github.com/haskell-servant/servant/pull/959))
28+
29+- Added `NoFraming` streaming strategy
30+ ([#959](https://github.com/haskell-servant/servant/pull/959))
31+
32+- *servant-client-core* Add `hoistClient` to `HasClient`.
33+ Just like `hoistServer` allows us to change the monad in which request handlers
34+ of a web application live in, we also have `hoistClient` for changing the monad
8− client functions run.
35+ in which *client functions* live.
36+ Read [tutorial section for more information](https://haskell-servant.readthedocs.io/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
9 ([#936](https://github.com/haskell-servant/servant/pull/936))
37 ([#936](https://github.com/haskell-servant/servant/pull/936))
10
38
39+- *servant-client* Add more constructors to `RequestBody`, including
40+ `RequestBodyStream`.
41+ *Note:* we are looking for http-library agnostic API,
42+ so the might change again soon.
43+ Tell us which constructors are useful for you!
44+ ([#913](https://github.com/haskell-servant/servant/pull/913))
45+
110.13.0.1
460.13.0.1
12--------
47--------
13
48
servant-client/servant-client.cabal+15−21
@@ -51,7 +51,7 @@ library
51 , transformers >= 0.3.0.0 && < 0.6
51 , transformers >= 0.3.0.0 && < 0.6
52
52
53 if !impl(ghc >= 8.0)
53 if !impl(ghc >= 8.0)
54− build-depends: semigroups >=0.18.3 && <0.19
54+ build-depends: semigroups >=0.18.4 && <0.19
55
55
56 -- Servant dependencies
56 -- Servant dependencies
57 build-depends:
57 build-depends:
@@ -60,19 +60,16 @@ library
60 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
60 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
61 -- Here can be exceptions if we really need features from the newer versions.
61 -- Here can be exceptions if we really need features from the newer versions.
62 build-depends:
62 build-depends:
63− aeson >= 1.2.3.0 && < 1.5
64− , base-compat >= 0.9.3 && < 0.11
63+ base-compat >= 0.10.1 && < 0.11
65− , attoparsec >= 0.13.2.0 && < 0.14
66− , http-client >= 0.5.7.1 && < 0.6
64+ , http-client >= 0.5.12 && < 0.6
67− , http-client-tls >= 0.3.5.1 && < 0.4
68− , http-media >= 0.7.1.1 && < 0.8
65+ , http-media >= 0.7.1.2 && < 0.8
69− , http-types >= 0.12 && < 0.13
66+ , http-types >= 0.12.1 && < 0.13
70− , exceptions >= 0.8.3 && < 0.11
67+ , exceptions >= 0.10.0 && < 0.11
71− , monad-control >= 1.0.0.4 && < 1.1
68+ , monad-control >= 1.0.2.3 && < 1.1
72− , semigroupoids >= 5.2.1 && < 5.3
69+ , semigroupoids >= 5.2.2 && < 5.3
73− , stm >= 2.4.4.1 && < 2.5
70+ , stm >= 2.4.5.0 && < 2.5
74− , transformers-base >= 0.4.4 && < 0.5
71+ , transformers-base >= 0.4.5.2 && < 0.5
75− , transformers-compat >= 0.5.1 && < 0.7
72+ , transformers-compat >= 0.6.2 && < 0.7
76
73
77 hs-source-dirs: src
74 hs-source-dirs: src
78 default-language: Haskell2010
75 default-language: Haskell2010
@@ -97,10 +94,8 @@ test-suite spec
97 , aeson
94 , aeson
98 , base-compat
95 , base-compat
99 , bytestring
96 , bytestring
100− , containers
101 , http-api-data
97 , http-api-data
102 , http-client
98 , http-client
103− , http-media
104 , http-types
99 , http-types
105 , mtl
100 , mtl
106 , servant-client
101 , servant-client
@@ -117,18 +112,16 @@ test-suite spec
117
112
118 -- Additonal dependencies
113 -- Additonal dependencies
119 build-depends:
114 build-depends:
120− deepseq >= 1.3.0.2 && < 1.5
121− , generics-sop >= 0.3.1.0 && < 0.4
115+ generics-sop >= 0.3.2.0 && < 0.4
122− , hspec >= 2.4.4 && < 2.6
116+ , hspec >= 2.5.1 && < 2.6
123 , HUnit >= 1.6 && < 1.7
117 , HUnit >= 1.6 && < 1.7
124− , random-bytestring >= 0.1 && < 0.2
125 , network >= 2.6.3.2 && < 2.8
118 , network >= 2.6.3.2 && < 2.8
126 , QuickCheck >= 2.10.1 && < 2.12
119 , QuickCheck >= 2.10.1 && < 2.12
127 , servant == 0.14.*
120 , servant == 0.14.*
128 , servant-server == 0.14.*
121 , servant-server == 0.14.*
129
122
130 build-tool-depends:
123 build-tool-depends:
131− hspec-discover:hspec-discover >= 2.4.4 && < 2.6
124+ hspec-discover:hspec-discover >= 2.5.1 && < 2.6
132
125
133test-suite readme
126test-suite readme
134 type: exitcode-stdio-1.0
127 type: exitcode-stdio-1.0
@@ -136,3 +129,4 @@ test-suite readme
136 build-depends: base, servant, http-client, text, servant-client, markdown-unlit
129 build-depends: base, servant, http-client, text, servant-client, markdown-unlit
137 build-tool-depends: markdown-unlit:markdown-unlit
130 build-tool-depends: markdown-unlit:markdown-unlit
138 ghc-options: -pgmL markdown-unlit
131 ghc-options: -pgmL markdown-unlit
132+ default-language: Haskell2010
servant-docs/servant-docs.cabal+1−1
@@ -64,7 +64,7 @@ library
64 , case-insensitive >= 1.2.0.10 && < 1.3
64 , case-insensitive >= 1.2.0.10 && < 1.3
65 , control-monad-omega >= 0.3.1 && < 0.4
65 , control-monad-omega >= 0.3.1 && < 0.4
66 , hashable >= 1.2.6.1 && < 1.3
66 , hashable >= 1.2.6.1 && < 1.3
67− , http-media >= 0.7.1.1 && < 0.8
67+ , http-media >= 0.7.0 && < 0.8
68 , http-types >= 0.12 && < 0.13
68 , http-types >= 0.12 && < 0.13
69 , lens >= 4.15.4 && < 4.17
69 , lens >= 4.15.4 && < 4.17
70 , string-conversions >= 0.4.0.1 && < 0.5
70 , string-conversions >= 0.4.0.1 && < 0.5
servant-foreign/servant-foreign.cabal+1
@@ -1,5 +1,6 @@
1name: servant-foreign
1name: servant-foreign
2version: 0.11.1
2version: 0.11.1
3+x-revision: 2
3synopsis: Helpers for generating clients for servant APIs in any programming language
4synopsis: Helpers for generating clients for servant APIs in any programming language
4description:
5description:
5 Helper types and functions for generating client functions for servant APIs in any programming language
6 Helper types and functions for generating client functions for servant APIs in any programming language
servant-server/CHANGELOG.md+46
@@ -1,6 +1,52 @@
1[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/CHANGELOG.md)
1[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/CHANGELOG.md)
2[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
2[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
3
3
4+0.14
5+----
6+
7+- `Stream` takes a status code argument
8+
9+ ```diff
10+ -Stream method framing ctype a
11+ +Stream method status framing ctype a
12+ ```
13+
14+ ([#966](https://github.com/haskell-servant/servant/pull/966)
15+ [#972](https://github.com/haskell-servant/servant/pull/972))
16+
17+- `ToStreamGenerator` definition changed, so it's possible to write an instance
18+ for conduits.
19+
20+ ```diff
21+ -class ToStreamGenerator f a where
22+ - toStreamGenerator :: f a -> StreamGenerator a
23+ +class ToStreamGenerator a b | a -> b where
24+ + toStreamGenerator :: a -> StreamGenerator b
25+ ```
26+
27+ ([#959](https://github.com/haskell-servant/servant/pull/959))
28+
29+- Added `NoFraming` streaming strategy
30+ ([#959](https://github.com/haskell-servant/servant/pull/959))
31+
32+- *servant-server* File serving in polymorphic monad.
33+ i.e. Generalised types of `serveDirectoryFileServer` etc functions in
34+ `Servant.Utils.StaticFiles`
35+ ([#953](https://github.com/haskell-servant/servant/pull/953))
36+
37+- *servant-server* `ReqBody` content type check is recoverable.
38+ This allows writing APIs like:
39+
40+ ```haskell
41+ ReqBody '[JSON] Int :> Post '[PlainText] Int
42+ :<|> ReqBody '[PlainText] Int :> Post '[PlainText] Int
43+ ```
44+
45+ which is useful when handlers are subtly different,
46+ for example may do less work.
47+ ([#937](https://github.com/haskell-servant/servant/pull/937))
48+
49+
40.13.0.1
500.13.0.1
5--------
51--------
6
52
servant-server/servant-server.cabal+23−31
@@ -40,7 +40,7 @@ custom-setup
40 setup-depends:
40 setup-depends:
41 base >= 4 && <5,
41 base >= 4 && <5,
42 Cabal,
42 Cabal,
43− cabal-doctest >= 1.0.1 && <1.1
43+ cabal-doctest >= 1.0.6 && <1.1
44
44
45library
45library
46 exposed-modules:
46 exposed-modules:
@@ -71,7 +71,7 @@ library
71
71
72 if !impl(ghc >= 8.0)
72 if !impl(ghc >= 8.0)
73 build-depends:
73 build-depends:
74− semigroups >= 0.18.3 && < 0.19
74+ semigroups >= 0.18.4 && < 0.19
75
75
76 -- Servant dependencies
76 -- Servant dependencies
77 build-depends:
77 build-depends:
@@ -80,28 +80,22 @@ library
80 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
80 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
81 -- Here can be exceptions if we really need features from the newer versions.
81 -- Here can be exceptions if we really need features from the newer versions.
82 build-depends:
82 build-depends:
83− aeson >= 1.2.3.0 && < 1.5
84− , base-compat >= 0.9.3 && < 0.11
83+ base-compat >= 0.10.1 && < 0.11
85− , attoparsec >= 0.13.2.0 && < 0.14
86 , base64-bytestring >= 1.0.0.1 && < 1.1
84 , base64-bytestring >= 1.0.0.1 && < 1.1
87− , exceptions >= 0.8.3 && < 0.11
85+ , exceptions >= 0.10.0 && < 0.11
88− , http-api-data >= 0.3.7.1 && < 0.4
86+ , http-api-data >= 0.3.8.1 && < 0.4
89− , http-media >= 0.7.1.1 && < 0.8
87+ , http-media >= 0.7.1.2 && < 0.8
90− , http-types >= 0.12 && < 0.13
88+ , http-types >= 0.12.1 && < 0.13
91 , network-uri >= 2.6.1.0 && < 2.7
89 , network-uri >= 2.6.1.0 && < 2.7
92− , monad-control >= 1.0.0.4 && < 1.1
90+ , monad-control >= 1.0.2.3 && < 1.1
93− , network >= 2.6.3.2 && < 2.8
91+ , network >= 2.6.3.5 && < 2.8
94− , safe >= 0.3.15 && < 0.4
95− , split >= 0.2.3.2 && < 0.3
96 , string-conversions >= 0.4.0.1 && < 0.5
92 , string-conversions >= 0.4.0.1 && < 0.5
97− , system-filepath >= 0.4 && < 0.5
98− , resourcet >= 1.1.9 && < 1.3
93+ , resourcet >= 1.1.11 && < 1.3
99 , tagged >= 0.8.5 && < 0.9
94 , tagged >= 0.8.5 && < 0.9
100 , transformers-base >= 0.4.4 && < 0.5
95 , transformers-base >= 0.4.4 && < 0.5
101− , transformers-compat >= 0.5.1 && < 0.7
96+ , transformers-compat >= 0.6.2 && < 0.7
102 , wai >= 3.2.1.1 && < 3.3
97 , wai >= 3.2.1.1 && < 3.3
103 , wai-app-static >= 3.1.6.1 && < 3.2
98 , wai-app-static >= 3.1.6.1 && < 3.2
104− , warp >= 3.2.13 && < 3.3
105 , word8 >= 0.1.3 && < 0.2
99 , word8 >= 0.1.3 && < 0.2
106
100
107 hs-source-dirs: src
101 hs-source-dirs: src
@@ -120,11 +114,13 @@ executable greet
120 base
114 base
121 , servant
115 , servant
122 , servant-server
116 , servant-server
123− , aeson
124− , warp
125 , wai
117 , wai
126 , text
118 , text
127
119
120+ build-depends:
121+ aeson >= 1.3.1.1 && < 1.5
122+ , warp >= 3.2.13 && < 3.3
123+
128test-suite spec
124test-suite spec
129 type: exitcode-stdio-1.0
125 type: exitcode-stdio-1.0
130 ghc-options: -Wall
126 ghc-options: -Wall
@@ -148,13 +144,10 @@ test-suite spec
148 build-depends:
144 build-depends:
149 base
145 base
150 , base-compat
146 , base-compat
151− , aeson
152 , base64-bytestring
147 , base64-bytestring
153 , bytestring
148 , bytestring
154− , exceptions
155 , http-types
149 , http-types
156 , mtl
150 , mtl
157− , network
158 , resourcet
151 , resourcet
159 , safe
152 , safe
160 , servant
153 , servant
@@ -164,27 +157,26 @@ test-suite spec
164 , transformers
157 , transformers
165 , transformers-compat
158 , transformers-compat
166 , wai
159 , wai
167− , warp
168
160
169 -- Additonal dependencies
161 -- Additonal dependencies
170 build-depends:
162 build-depends:
163+ aeson >= 1.3.1.1 && < 1.5
171− directory >= 1.2.1.0 && < 1.4
164+ , directory >= 1.2.1.0 && < 1.4
172− , hspec >= 2.4.4 && < 2.6
165+ , hspec >= 2.5.1 && < 2.6
173− , hspec-wai >= 0.9 && < 0.10
166+ , hspec-wai >= 0.9.0 && < 0.10
167+ , QuickCheck >= 2.11.3 && < 2.12
174 , should-not-typecheck >= 2.1.0 && < 2.2
168 , should-not-typecheck >= 2.1.0 && < 2.2
175− , parsec >= 3.1.11 && < 3.2
169+ , temporary >= 1.3 && < 1.4
176− , QuickCheck >= 2.10.1 && < 2.12
177 , wai-extra >= 3.0.21.0 && < 3.1
170 , wai-extra >= 3.0.21.0 && < 3.1
178− , temporary >= 1.2.0.3 && < 1.4
179
171
180 build-tool-depends:
172 build-tool-depends:
181− hspec-discover:hspec-discover >=2.4.4 && <2.6
173+ hspec-discover:hspec-discover >= 2.5.1 && <2.6
182
174
183test-suite doctests
175test-suite doctests
184 build-depends:
176 build-depends:
185 base
177 base
186 , servant-server
178 , servant-server
187− , doctest >= 0.13.0 && <0.16
179+ , doctest >= 0.15.0 && <0.16
188 type: exitcode-stdio-1.0
180 type: exitcode-stdio-1.0
189 main-is: test/doctests.hs
181 main-is: test/doctests.hs
190 buildable: True
182 buildable: True
servant/CHANGELOG.md+2−2
@@ -30,11 +30,11 @@
30- Added `NoFraming` streaming strategy
30- Added `NoFraming` streaming strategy
31 ([#959](https://github.com/haskell-servant/servant/pull/959))
31 ([#959](https://github.com/haskell-servant/servant/pull/959))
32
32
33−- *servant-client* Free `Client` implementation.
33+- *servant-client-core* Free `Client` implementation.
34 Useful for testing `HasClient` instances.
34 Useful for testing `HasClient` instances.
35 ([#920](https://github.com/haskell-servant/servant/pull/920))
35 ([#920](https://github.com/haskell-servant/servant/pull/920))
36
36
37−- *servant-client* Add `hoistClient` to `HasClient`.
37+- *servant-client-core* Add `hoistClient` to `HasClient`.
38 Just like `hoistServer` allows us to change the monad in which request handlers
38 Just like `hoistServer` allows us to change the monad in which request handlers
39 of a web application live in, we also have `hoistClient` for changing the monad
39 of a web application live in, we also have `hoistClient` for changing the monad
40 in which *client functions* live.
40 in which *client functions* live.
servant/servant.cabal+18−19
@@ -34,7 +34,7 @@ custom-setup
34 setup-depends:
34 setup-depends:
35 base >= 4 && <5,
35 base >= 4 && <5,
36 Cabal,
36 Cabal,
37− cabal-doctest >= 1.0.2 && <1.1
37+ cabal-doctest >= 1.0.6 && <1.1
38
38
39library
39library
40 exposed-modules:
40 exposed-modules:
@@ -77,25 +77,25 @@ library
77
77
78 if !impl(ghc >= 8.0)
78 if !impl(ghc >= 8.0)
79 build-depends:
79 build-depends:
80− semigroups >= 0.18.3 && < 0.19
80+ semigroups >= 0.18.4 && < 0.19
81
81
82 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
82 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
83 -- Here can be exceptions if we really need features from the newer versions.
83 -- Here can be exceptions if we really need features from the newer versions.
84 build-depends:
84 build-depends:
85− base-compat >= 0.9.3 && < 0.11
85+ base-compat >= 0.10.1 && < 0.11
86− , aeson >= 1.2.3.0 && < 1.5
86+ , aeson >= 1.3.1.1 && < 1.5
87− , attoparsec >= 0.13.2.0 && < 0.14
87+ , attoparsec >= 0.13.2.2 && < 0.14
88 , case-insensitive >= 1.2.0.10 && < 1.3
88 , case-insensitive >= 1.2.0.10 && < 1.3
89− , http-api-data >= 0.3.7.1 && < 0.4
89+ , http-api-data >= 0.3.8.1 && < 0.4
90− , http-media >= 0.7.1.1 && < 0.8
90+ , http-media >= 0.7.1.2 && < 0.8
91− , http-types >= 0.12 && < 0.13
91+ , http-types >= 0.12.1 && < 0.13
92 , natural-transformation >= 0.4 && < 0.5
92 , natural-transformation >= 0.4 && < 0.5
93− , mmorph >= 1.1.0 && < 1.2
93+ , mmorph >= 1.1.2 && < 1.2
94 , tagged >= 0.8.5 && < 0.9
94 , tagged >= 0.8.5 && < 0.9
95− , singleton-bool >= 0.1.2.0 && < 0.2
95+ , singleton-bool >= 0.1.4 && < 0.2
96 , string-conversions >= 0.4.0.1 && < 0.5
96 , string-conversions >= 0.4.0.1 && < 0.5
97 , network-uri >= 2.6.1.0 && < 2.7
97 , network-uri >= 2.6.1.0 && < 2.7
98− , vault >= 0.3.0.7 && < 0.4
98+ , vault >= 0.3.1.1 && < 0.4
99
99
100 hs-source-dirs: src
100 hs-source-dirs: src
101 default-language: Haskell2010
101 default-language: Haskell2010
@@ -141,7 +141,6 @@ test-suite spec
141 base
141 base
142 , base-compat
142 , base-compat
143 , aeson
143 , aeson
144− , attoparsec
145 , bytestring
144 , bytestring
146 , servant
145 , servant
147 , string-conversions
146 , string-conversions
@@ -153,23 +152,23 @@ test-suite spec
153
152
154 -- Additonal dependencies
153 -- Additonal dependencies
155 build-depends:
154 build-depends:
156− aeson-compat >= 0.3.3 && < 0.4
155+ aeson-compat >= 0.3.7.1 && < 0.4
157− , hspec >= 2.4.4 && < 2.6
156+ , hspec >= 2.5.1 && < 2.6
158− , QuickCheck >= 2.10.1 && < 2.12
157+ , QuickCheck >= 2.11.3 && < 2.12
159− , quickcheck-instances >= 0.3.16 && < 0.4
158+ , quickcheck-instances >= 0.3.18 && < 0.4
160
159
161 build-tool-depends:
160 build-tool-depends:
162− hspec-discover:hspec-discover >= 2.4.4 && < 2.6
161+ hspec-discover:hspec-discover >= 2.5.1 && < 2.6
163
162
164test-suite doctests
163test-suite doctests
165 build-depends:
164 build-depends:
166 base
165 base
167 , servant
166 , servant
168− , doctest >= 0.13.0 && <0.16
167+ , doctest >= 0.15.0 && <0.16
169
168
170 -- We test Links failure with doctest, so we need extra dependencies
169 -- We test Links failure with doctest, so we need extra dependencies
171 build-depends:
170 build-depends:
172− hspec >= 2.4.4 && < 2.6
171+ hspec >= 2.5.1 && < 2.6
173
172
174 type: exitcode-stdio-1.0
173 type: exitcode-stdio-1.0
175 main-is: test/doctests.hs
174 main-is: test/doctests.hs
stack.yaml+1−14
@@ -1,5 +1,5 @@
1# Let's try to keep resolver at the first day of the month
1# Let's try to keep resolver at the first day of the month
2−resolver: nightly-2018-03-01
2+resolver: nightly-2018-06-01
3packages:
3packages:
4- servant-client/
4- servant-client/
5- servant-client-core/
5- servant-client-core/
@@ -8,18 +8,5 @@ packages:
8- servant-server/
8- servant-server/
9- servant/
9- servant/
10
10
11−extra-deps:
12−- cabal-doctest-1.0.6
13−- http-api-data-0.3.7.2
14−- http-types-0.12
15−- text-1.2.3.0
16−- aeson-1.3.0.0
17−- exceptions-0.10.0
18−- aeson-compat-0.3.7.1
19−- free-5.0.1
20−- lens-4.16
21−- random-bytestring-0.1.3
22−- pcg-random-0.1.3.5
23−
24# allow-newer: true # ignores all bounds, that's a sledgehammer
11# allow-newer: true # ignores all bounds, that's a sledgehammer
25# - doc/tutorial/
12# - doc/tutorial/