git.iko.soy/typeable/servant
on named-routes help sign in
375 lines 13 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)
40.18.3
5------
7### Significant changes
9- Add response header support to UVerb (#1420)
11### Other changes
13- Support GHC-9.0.1.
14- Bump `bytestring`, `hspec` and `base64-bytestring` dependencies.
160.18.2
17------
19### Significant changes
21- Support `Fragment` combinator.
230.18.1
24------
26### Significant changes
28- Union verbs
30### Other changes
32- Bump "tested-with" ghc versions
33- Allow newer dependencies
350.18
36----
38### Significant changes
40- Support for ghc8.8 (#1318, #1326, #1327)
42- Configurable error messages for automatic errors thrown by servant,
43 like "no route" or "could not parse json body" (#1312, #1326, #1327)
460.17
47----
49### Significant changes
51- 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)
53 The `NoContent` API endpoints should now use `NoContentVerb` combinator.
54 The API type changes are usually of the kind
56 ```diff
57 - :<|> PostNoContent '[JSON] NoContent
58 + :<|> PostNoContent
59 ```
61 i.e. one doesn't need to specify the content-type anymore. There is no content.
63- `Capture` can be `Lenient` [#1155](https://github.com/haskell-servant/servant/issues/1155) [#1156](https://github.com/haskell-servant/servant/pull/1156)
65 You can specify a lenient capture as
67 ```haskell
68 :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET
69 ```
71 which will make the capture always succeed. Handlers will be of the
72 type `Either String CapturedType`, where `Left err` represents
73 the possible parse failure.
75- *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)
77 Some APIs need query parameters rewriting, e.g. in order to support
78 for multiple casing (camel, snake, etc) or something to that effect.
80 This could be easily achieved by using WAI Middleware and modifying
81 request's `Query`. But QueryParam, QueryParams and QueryFlag use
82 `rawQueryString`. By using `queryString` rather then `rawQueryString`
83 we can enable such rewritings.
85- *servant* *servant-server* Make packages `build-type: Simple` [#1263](https://github.com/haskell-servant/servant/pull/1263)
87 We used `build-type: Custom`, but it's problematic e.g.
88 for cross-compiling. The benefit is small, as the doctests
89 can be run other ways too (though not so conveniently).
910.16.2
92------
94* `singleton-bool-0.1.5` (`SBool` is re-exported)
95 - Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
96 - Add `Show`, `Eq`, `Ord` `SBool b` instances.
97* dependencies update
990.16.1
100------
102* Use `http-api-data-0.4.1` (a part of its API is re-exported)
103 [#1181](https://github.com/haskell-servant/servant/pull/1181)
1050.16
106----
108- Rename `ServantError` to `ClientError`, `ServantErr` to `ServerError`
109 [#1131](https://github.com/haskell-servant/servant/pull/1131)
110- *servant-server* Reorder HTTP failure code priorities
111 [#1103](https://github.com/haskell-servant/servant/pull/1103)
112- *servant-server* Re-organise internal modules
113 [#1139](https://github.com/haskell-servant/servant/pull/1139)
114- Allow `network-3.0`
115 [#1107](https://github.com/haskell-servant/servant/pull/1107)
1170.15
118----
120- Streaming refactoring.
121 [#991](https://github.com/haskell-servant/servant/pull/991)
122 [#1076](https://github.com/haskell-servant/servant/pull/1076)
123 [#1077](https://github.com/haskell-servant/servant/pull/1077)
125 The streaming functionality (`Servant.API.Stream`) is refactored to use
126 `servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
127 which replaces both `StreamGenerator` and `ResultStream` types.
129 New conversion type-classes are `ToSourceIO` and `FromSourceIO`
130 (replacing `ToStreamGenerator` and `BuildFromStream`).
131 There are instances for *conduit*, *pipes* and *machines* in new packages:
132 [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
133 [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
134 [servant-machines](https://hackage.haskell.org/package/servant-machines)
135 respectively.
137 Writing new framing strategies is simpler. Check existing strategies for examples.
139 This change shouldn't affect you, if you don't use streaming endpoints.
141- Drop support for GHC older than 8.0
142 [#1008](https://github.com/haskell-servant/servant/pull/1008)
143 [#1009](https://github.com/haskell-servant/servant/pull/1009)
145- *servant* NewlineFraming encodes newline after each element (i.e last)
146 [#1079](https://github.com/haskell-servant/servant/pull/1079)
147 [#1011](https://github.com/haskell-servant/servant/issues/1011)
149- *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a`
150 [#1064](https://github.com/haskell-servant/servant/pull/1064)
152- *servant-server* Add `MonadMask Handler`
153 [#1068](https://github.com/haskell-servant/servant/pull/1068)
155- *servant* Export `GetHeaders'`
156 [#1052](https://github.com/haskell-servant/servant/pull/1052)
158- *servant* Add `Bitraversable` and other `Bi-` instances for `:<|>`
159 [#1032](https://github.com/haskell-servant/servant/pull/1032)
161- *servant* Add `PutCreated` method type alias
162 [#1024](https://github.com/haskell-servant/servant/pull/1024)
164- *servant* Add `ToSourceIO (NonEmpty a)` instance
165 [#988](https://github.com/haskell-servant/servant/pull/988)
1670.14.1
168------
170- Merge in `servant-generic` (by [Patrick Chilton](https://github.com/chpatrick))
171 into `servant` (`Servant.API.Generic`),
172 `servant-client-code` (`Servant.Client.Generic`)
173 and `servant-server` (`Servant.Server.Generic`).
175- *servant-server* Deprecate `Servant.Utils.StaticUtils`, use `Servant.Server.StaticUtils`.
1770.14
178----
180- `Stream` takes a status code argument
182 ```diff
183 -Stream method framing ctype a
184 +Stream method status framing ctype a
185 ```
187 ([#966](https://github.com/haskell-servant/servant/pull/966)
188 [#972](https://github.com/haskell-servant/servant/pull/972))
190- `ToStreamGenerator` definition changed, so it's possible to write an instance
191 for conduits.
193 ```diff
194 -class ToStreamGenerator f a where
195 - toStreamGenerator :: f a -> StreamGenerator a
196 +class ToStreamGenerator a b | a -> b where
197 + toStreamGenerator :: a -> StreamGenerator b
198 ```
200 ([#959](https://github.com/haskell-servant/servant/pull/959))
202- Added `NoFraming` streaming strategy
203 ([#959](https://github.com/haskell-servant/servant/pull/959))
205- *servant-server* File serving in polymorphic monad.
206 i.e. Generalised types of `serveDirectoryFileServer` etc functions in
207 `Servant.Utils.StaticFiles`
208 ([#953](https://github.com/haskell-servant/servant/pull/953))
210- *servant-server* `ReqBody` content type check is recoverable.
211 This allows writing APIs like:
213 ```haskell
214 ReqBody '[JSON] Int :> Post '[PlainText] Int
215 :<|> ReqBody '[PlainText] Int :> Post '[PlainText] Int
216 ```
218 which is useful when handlers are subtly different,
219 for example may do less work.
220 ([#937](https://github.com/haskell-servant/servant/pull/937))
2230.13.0.1
224--------
226- Support `base-compat-0.10`
2280.13
229----
231- Streaming endpoint support.
232 ([#836](https://github.com/haskell-servant/servant/pull/836))
233- *servant* Add `Servant.API.Modifiers`
234 ([#873](https://github.com/haskell-servant/servant/pull/873))
2360.12
237----
239### Breaking changes
241* Added `hoistServer` member to the `HasServer` class, which is `HasServer`
242 specific `enter`.
243 ([#804](https://github.com/haskell-servant/servant/pull/804))
2450.11
246----
248### Breaking changes
250* Changed `HasServer` instances for `Header` to throw 400 when parsing fails
251 ([#724](https://github.com/haskell-servant/servant/pull/724))
252* Added `headersD` block to `Delayed`
253 ([#724](https://github.com/haskell-servant/servant/pull/724))
255### Other changes
257* Add `err418`, `err422` error codes
258 ([#739](https://github.com/haskell-servant/servant/pull/739))
2600.10
261----
263### Breaking changes
265* `Handler` is now an abstract datatype. Migration hint: change `throwE` to `throwError`.
266 ([#641](https://github.com/haskell-servant/servant/issues/641))
268* Changed `HasServer` instances for `QueryParam` and `QueryParam` to throw 400
269 when parsing fails
270 ([#649](https://github.com/haskell-servant/servant/pull/649))
272### Other changes
274* Added `paramsD` block to `Delayed`
276* Add `err422` Unprocessable Entity
277 ([#646](https://github.com/haskell-servant/servant/pull/646))
279* Deprecate `serveDirectory` and introduce `serveDirectoryFileServer`,
280 `serveDirectoryWebApp`, `serveDirectoryWebAppLookup`, `serveDirectoryEmbedded`
281 and `serveDirectoryWith` which offer 4 default options and a more flexible
282 one for serving static files.
283 ([#658](https://github.com/haskell-servant/servant/pull/658))
285* `DelayedIO` is an instance of `MonadResource`, allowing safe resource handling.
286 ([#622](https://github.com/haskell-servant/servant/pull/622)
287 , [#674](https://github.com/haskell-servant/servant/pull/674)
288 , [#675](https://github.com/haskell-servant/servant/pull/675))
2900.7.1
291------
293* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
294* Support GHC 8.0
2960.7
297---
299* The `Router` type has been changed. Static router tables should now
300 be properly shared between requests, drastically increasing the
301 number of situations where servers will be able to route requests
302 efficiently. Functions `layout` and `layoutWithContext` have been
303 added to visualize the router layout for debugging purposes. Test
304 cases for expected router layouts have been added.
305* If an endpoint is discovered to have a non-matching "accept header",
306 this is now a recoverable rather than a fatal failure, allowing
307 different endpoints for the same route, but with different content
308 types to be specified modularly.
309* Export `throwError` from module `Servant`
310* Add `Handler` type synonym
3120.6.1
313-----
315* If servers use the `BasicAuth` combinator and receive requests with missing or
316 invalid credentials, the resulting error responses (401 and 403) could be
317 overwritten by subsequent alternative routes. Now `BasicAuth` uses `FailFatal`
318 and the error responses can't be overwritten anymore.
3200.6
321---
323* Query parameters that can't be parsed result in a `400` (was `404`).
3250.5
326---
328* Add `Config` machinery (https://github.com/haskell-servant/servant/pull/327).
329 This is a breaking change, as the signatures of both `route`, `serve` and the
330 typeclass `HasServer` now take an additional parameter.
331* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
332* Drop `EitherT` in favor of `ExceptT`
333* Use `http-api-data` instead of `Servant.Common.Text`
334* Remove matrix params.
335* Remove `RouteMismatch`.
336* Redefined constructors of `RouteResult`.
337* Added `Delayed` and related functions (`addMethodCheck`, `addAcceptCheck`, `addBodyCheck`, `runDelayed`)
338* Added support for Basic Authentication
339* Add generalized authentication support via the `AuthServerData` type family and `AuthHandler` handler
3410.4.1
342-----
343* Bump attoparsec upper bound to < 0.14
344* Bump wai-app-static upper bound to < 3.2
345* Bump either upper bound to < 4.5
3470.4
348---
349* `Delete` now is like `Get`, `Post`, `Put`, and `Patch` and returns a response body
350* Add a `RouteMismatch` constructor for arbitrary HTTP response codes (https://github.com/haskell-servant/servant-server/pull/22)
351* Add support for the `Patch` combinator
352* Support for `Accept`/`Content-type` headers and for the content-type aware combinators in *servant-0.4*
353* Export `toApplication` from `Servant.Server` (https://github.com/haskell-servant/servant-server/pull/29)
354* Support other Monads than just `EitherT (Int, String) IO` (https://github.com/haskell-servant/servant-server/pull/21)
355* Make methods return status code 204 if they return () (https://github.com/haskell-servant/servant-server/issues/28)
356* Add server support for response headers
357* Use `ServantErr` instead of `(Int,String)` in `EitherT` handlers
358* Add `errXXX` functions for HTTP errors with sensible default reason strings
359* Add `enter` function for applying natural transformations to handlers
3610.2.4
362-----
363* Added support for matrix parameters, see e.g. http://www.w3.org/DesignIssues/MatrixURIs.html
364* Add support for serializing based on Accept header
365 (https://github.com/haskell-servant/servant-server/issues/9)
366* Ignore trailing slashes
367 (https://github.com/haskell-servant/servant-server/issues/5)
3700.2.3
371-----
373* Fix consuming request body issue
374 (https://github.com/haskell-servant/servant/issues/3)
375* Make code sample in Servant.Server complete