git.iko.soy/typeable/servant
on orphan-instances help sign in
393 lines 14 kB history raw
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)
4Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions.
60.19
7----
9### Significant changes
11- Drop support for GHC < 8.6.
12- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet).
13- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)),
14 which fixes a [DOS vulnerability](https://github.com/haskell/aeson/issues/864)
15 related to hash collisions.
16- Add `NamedRoutes` combinator, making support for records first-class in Servant
17 ([#1388](https://github.com/haskell-servant/servant/pull/1388)).
18- Add custom type errors for partially applied combinators
19 ([#1289](https://github.com/haskell-servant/servant/pull/1289),
20 [#1486](https://github.com/haskell-servant/servant/pull/1486)).
220.18.3
23------
25### Significant changes
27- Add response header support to UVerb (#1420)
29### Other changes
31- Support GHC-9.0.1.
32- Bump `bytestring`, `hspec` and `base64-bytestring` dependencies.
340.18.2
35------
37### Significant changes
39- Support `Fragment` combinator.
410.18.1
42------
44### Significant changes
46- Union verbs
48### Other changes
50- Bump "tested-with" ghc versions
51- Allow newer dependencies
530.18
54----
56### Significant changes
58- Support for ghc8.8 (#1318, #1326, #1327)
60- Configurable error messages for automatic errors thrown by servant,
61 like "no route" or "could not parse json body" (#1312, #1326, #1327)
640.17
65----
67### Significant changes
69- Add NoContentVerb [#1028](https://github.com/haskell-servant/servant/issues/1028) [#1219](https://github.com/haskell-servant/servant/pull/1219) [#1228](https://github.com/haskell-servant/servant/pull/1228)
71 The `NoContent` API endpoints should now use `NoContentVerb` combinator.
72 The API type changes are usually of the kind
74 ```diff
75 - :<|> PostNoContent '[JSON] NoContent
76 + :<|> PostNoContent
77 ```
79 i.e. one doesn't need to specify the content-type anymore. There is no content.
81- `Capture` can be `Lenient` [#1155](https://github.com/haskell-servant/servant/issues/1155) [#1156](https://github.com/haskell-servant/servant/pull/1156)
83 You can specify a lenient capture as
85 ```haskell
86 :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET
87 ```
89 which will make the capture always succeed. Handlers will be of the
90 type `Either String CapturedType`, where `Left err` represents
91 the possible parse failure.
93- *servant-server* use queryString to parse QueryParam, QueryParams and QueryFlag [#1249](https://github.com/haskell-servant/servant/pull/1249) [#1262](https://github.com/haskell-servant/servant/pull/1262)
95 Some APIs need query parameters rewriting, e.g. in order to support
96 for multiple casing (camel, snake, etc) or something to that effect.
98 This could be easily achieved by using WAI Middleware and modifying
99 request's `Query`. But QueryParam, QueryParams and QueryFlag use
100 `rawQueryString`. By using `queryString` rather then `rawQueryString`
101 we can enable such rewritings.
103- *servant* *servant-server* Make packages `build-type: Simple` [#1263](https://github.com/haskell-servant/servant/pull/1263)
105 We used `build-type: Custom`, but it's problematic e.g.
106 for cross-compiling. The benefit is small, as the doctests
107 can be run other ways too (though not so conveniently).
1090.16.2
110------
112* `singleton-bool-0.1.5` (`SBool` is re-exported)
113 - Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
114 - Add `Show`, `Eq`, `Ord` `SBool b` instances.
115* dependencies update
1170.16.1
118------
120* Use `http-api-data-0.4.1` (a part of its API is re-exported)
121 [#1181](https://github.com/haskell-servant/servant/pull/1181)
1230.16
124----
126- Rename `ServantError` to `ClientError`, `ServantErr` to `ServerError`
127 [#1131](https://github.com/haskell-servant/servant/pull/1131)
128- *servant-server* Reorder HTTP failure code priorities
129 [#1103](https://github.com/haskell-servant/servant/pull/1103)
130- *servant-server* Re-organise internal modules
131 [#1139](https://github.com/haskell-servant/servant/pull/1139)
132- Allow `network-3.0`
133 [#1107](https://github.com/haskell-servant/servant/pull/1107)
1350.15
136----
138- Streaming refactoring.
139 [#991](https://github.com/haskell-servant/servant/pull/991)
140 [#1076](https://github.com/haskell-servant/servant/pull/1076)
141 [#1077](https://github.com/haskell-servant/servant/pull/1077)
143 The streaming functionality (`Servant.API.Stream`) is refactored to use
144 `servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
145 which replaces both `StreamGenerator` and `ResultStream` types.
147 New conversion type-classes are `ToSourceIO` and `FromSourceIO`
148 (replacing `ToStreamGenerator` and `BuildFromStream`).
149 There are instances for *conduit*, *pipes* and *machines* in new packages:
150 [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
151 [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
152 [servant-machines](https://hackage.haskell.org/package/servant-machines)
153 respectively.
155 Writing new framing strategies is simpler. Check existing strategies for examples.
157 This change shouldn't affect you, if you don't use streaming endpoints.
159- Drop support for GHC older than 8.0
160 [#1008](https://github.com/haskell-servant/servant/pull/1008)
161 [#1009](https://github.com/haskell-servant/servant/pull/1009)
163- *servant* NewlineFraming encodes newline after each element (i.e last)
164 [#1079](https://github.com/haskell-servant/servant/pull/1079)
165 [#1011](https://github.com/haskell-servant/servant/issues/1011)
167- *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a`
168 [#1064](https://github.com/haskell-servant/servant/pull/1064)
170- *servant-server* Add `MonadMask Handler`
171 [#1068](https://github.com/haskell-servant/servant/pull/1068)
173- *servant* Export `GetHeaders'`
174 [#1052](https://github.com/haskell-servant/servant/pull/1052)
176- *servant* Add `Bitraversable` and other `Bi-` instances for `:<|>`
177 [#1032](https://github.com/haskell-servant/servant/pull/1032)
179- *servant* Add `PutCreated` method type alias
180 [#1024](https://github.com/haskell-servant/servant/pull/1024)
182- *servant* Add `ToSourceIO (NonEmpty a)` instance
183 [#988](https://github.com/haskell-servant/servant/pull/988)
1850.14.1
186------
188- Merge in `servant-generic` (by [Patrick Chilton](https://github.com/chpatrick))
189 into `servant` (`Servant.API.Generic`),
190 `servant-client-code` (`Servant.Client.Generic`)
191 and `servant-server` (`Servant.Server.Generic`).
193- *servant-server* Deprecate `Servant.Utils.StaticUtils`, use `Servant.Server.StaticUtils`.
1950.14
196----
198- `Stream` takes a status code argument
200 ```diff
201 -Stream method framing ctype a
202 +Stream method status framing ctype a
203 ```
205 ([#966](https://github.com/haskell-servant/servant/pull/966)
206 [#972](https://github.com/haskell-servant/servant/pull/972))
208- `ToStreamGenerator` definition changed, so it's possible to write an instance
209 for conduits.
211 ```diff
212 -class ToStreamGenerator f a where
213 - toStreamGenerator :: f a -> StreamGenerator a
214 +class ToStreamGenerator a b | a -> b where
215 + toStreamGenerator :: a -> StreamGenerator b
216 ```
218 ([#959](https://github.com/haskell-servant/servant/pull/959))
220- Added `NoFraming` streaming strategy
221 ([#959](https://github.com/haskell-servant/servant/pull/959))
223- *servant-server* File serving in polymorphic monad.
224 i.e. Generalised types of `serveDirectoryFileServer` etc functions in
225 `Servant.Utils.StaticFiles`
226 ([#953](https://github.com/haskell-servant/servant/pull/953))
228- *servant-server* `ReqBody` content type check is recoverable.
229 This allows writing APIs like:
231 ```haskell
232 ReqBody '[JSON] Int :> Post '[PlainText] Int
233 :<|> ReqBody '[PlainText] Int :> Post '[PlainText] Int
234 ```
236 which is useful when handlers are subtly different,
237 for example may do less work.
238 ([#937](https://github.com/haskell-servant/servant/pull/937))
2410.13.0.1
242--------
244- Support `base-compat-0.10`
2460.13
247----
249- Streaming endpoint support.
250 ([#836](https://github.com/haskell-servant/servant/pull/836))
251- *servant* Add `Servant.API.Modifiers`
252 ([#873](https://github.com/haskell-servant/servant/pull/873))
2540.12
255----
257### Breaking changes
259* Added `hoistServer` member to the `HasServer` class, which is `HasServer`
260 specific `enter`.
261 ([#804](https://github.com/haskell-servant/servant/pull/804))
2630.11
264----
266### Breaking changes
268* Changed `HasServer` instances for `Header` to throw 400 when parsing fails
269 ([#724](https://github.com/haskell-servant/servant/pull/724))
270* Added `headersD` block to `Delayed`
271 ([#724](https://github.com/haskell-servant/servant/pull/724))
273### Other changes
275* Add `err418`, `err422` error codes
276 ([#739](https://github.com/haskell-servant/servant/pull/739))
2780.10
279----
281### Breaking changes
283* `Handler` is now an abstract datatype. Migration hint: change `throwE` to `throwError`.
284 ([#641](https://github.com/haskell-servant/servant/issues/641))
286* Changed `HasServer` instances for `QueryParam` and `QueryParam` to throw 400
287 when parsing fails
288 ([#649](https://github.com/haskell-servant/servant/pull/649))
290### Other changes
292* Added `paramsD` block to `Delayed`
294* Add `err422` Unprocessable Entity
295 ([#646](https://github.com/haskell-servant/servant/pull/646))
297* Deprecate `serveDirectory` and introduce `serveDirectoryFileServer`,
298 `serveDirectoryWebApp`, `serveDirectoryWebAppLookup`, `serveDirectoryEmbedded`
299 and `serveDirectoryWith` which offer 4 default options and a more flexible
300 one for serving static files.
301 ([#658](https://github.com/haskell-servant/servant/pull/658))
303* `DelayedIO` is an instance of `MonadResource`, allowing safe resource handling.
304 ([#622](https://github.com/haskell-servant/servant/pull/622)
305 , [#674](https://github.com/haskell-servant/servant/pull/674)
306 , [#675](https://github.com/haskell-servant/servant/pull/675))
3080.7.1
309------
311* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
312* Support GHC 8.0
3140.7
315---
317* The `Router` type has been changed. Static router tables should now
318 be properly shared between requests, drastically increasing the
319 number of situations where servers will be able to route requests
320 efficiently. Functions `layout` and `layoutWithContext` have been
321 added to visualize the router layout for debugging purposes. Test
322 cases for expected router layouts have been added.
323* If an endpoint is discovered to have a non-matching "accept header",
324 this is now a recoverable rather than a fatal failure, allowing
325 different endpoints for the same route, but with different content
326 types to be specified modularly.
327* Export `throwError` from module `Servant`
328* Add `Handler` type synonym
3300.6.1
331-----
333* If servers use the `BasicAuth` combinator and receive requests with missing or
334 invalid credentials, the resulting error responses (401 and 403) could be
335 overwritten by subsequent alternative routes. Now `BasicAuth` uses `FailFatal`
336 and the error responses can't be overwritten anymore.
3380.6
339---
341* Query parameters that can't be parsed result in a `400` (was `404`).
3430.5
344---
346* Add `Config` machinery (https://github.com/haskell-servant/servant/pull/327).
347 This is a breaking change, as the signatures of both `route`, `serve` and the
348 typeclass `HasServer` now take an additional parameter.
349* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
350* Drop `EitherT` in favor of `ExceptT`
351* Use `http-api-data` instead of `Servant.Common.Text`
352* Remove matrix params.
353* Remove `RouteMismatch`.
354* Redefined constructors of `RouteResult`.
355* Added `Delayed` and related functions (`addMethodCheck`, `addAcceptCheck`, `addBodyCheck`, `runDelayed`)
356* Added support for Basic Authentication
357* Add generalized authentication support via the `AuthServerData` type family and `AuthHandler` handler
3590.4.1
360-----
361* Bump attoparsec upper bound to < 0.14
362* Bump wai-app-static upper bound to < 3.2
363* Bump either upper bound to < 4.5
3650.4
366---
367* `Delete` now is like `Get`, `Post`, `Put`, and `Patch` and returns a response body
368* Add a `RouteMismatch` constructor for arbitrary HTTP response codes (https://github.com/haskell-servant/servant-server/pull/22)
369* Add support for the `Patch` combinator
370* Support for `Accept`/`Content-type` headers and for the content-type aware combinators in *servant-0.4*
371* Export `toApplication` from `Servant.Server` (https://github.com/haskell-servant/servant-server/pull/29)
372* Support other Monads than just `EitherT (Int, String) IO` (https://github.com/haskell-servant/servant-server/pull/21)
373* Make methods return status code 204 if they return () (https://github.com/haskell-servant/servant-server/issues/28)
374* Add server support for response headers
375* Use `ServantErr` instead of `(Int,String)` in `EitherT` handlers
376* Add `errXXX` functions for HTTP errors with sensible default reason strings
377* Add `enter` function for applying natural transformations to handlers
3790.2.4
380-----
381* Added support for matrix parameters, see e.g. http://www.w3.org/DesignIssues/MatrixURIs.html
382* Add support for serializing based on Accept header
383 (https://github.com/haskell-servant/servant-server/issues/9)
384* Ignore trailing slashes
385 (https://github.com/haskell-servant/servant-server/issues/5)
3880.2.3
389-----
391* Fix consuming request body issue
392 (https://github.com/haskell-servant/servant/issues/3)
393* Make code sample in Servant.Server complete