git.iko.soy/typeable/servant
on alp/servant.dev help sign in
274 lines 10 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.16
5----
7- Rename `ServantError` to `ClientError`, `ServantErr` to `ServerError`
8 [#1131](https://github.com/haskell-servant/pull/1131)
9- *servant-server* Reorder HTTP failure code priorities
10 [#1103](https://github.com/haskell-servant/servant/pull/1103)
11- *servant-server* Re-organise internal modules
12 [#1139](https://github.com/haskell-servant/servant/pull/1139)
13- Allow `network-3.0`
14 [#1107](https://github.com/haskell-servant/pull/1107)
160.15
17----
19- Streaming refactoring.
20 [#991](https://github.com/haskell-servant/servant/pull/991)
21 [#1076](https://github.com/haskell-servant/servant/pull/1076)
22 [#1077](https://github.com/haskell-servant/servant/pull/1077)
24 The streaming functionality (`Servant.API.Stream`) is refactored to use
25 `servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
26 which replaces both `StreamGenerator` and `ResultStream` types.
28 New conversion type-classes are `ToSourceIO` and `FromSourceIO`
29 (replacing `ToStreamGenerator` and `BuildFromStream`).
30 There are instances for *conduit*, *pipes* and *machines* in new packages:
31 [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
32 [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
33 [servant-machines](https://hackage.haskell.org/package/servant-machines)
34 respectively.
36 Writing new framing strategies is simpler. Check existing strategies for examples.
38 This change shouldn't affect you, if you don't use streaming endpoints.
40- Drop support for GHC older than 8.0
41 [#1008](https://github.com/haskell-servant/servant/pull/1008)
42 [#1009](https://github.com/haskell-servant/servant/pull/1009)
44- *servant* NewlineFraming encodes newline after each element (i.e last)
45 [#1079](https://github.com/haskell-servant/servant/pull/1079)
46 [#1011](https://github.com/haskell-servant/servant/issues/1011)
48- *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a`
49 [#1064](https://github.com/haskell-servant/servant/pull/1064)
51- *servant-server* Add `MonadMask Handler`
52 [#1068](https://github.com/haskell-servant/servant/pull/1068)
54- *servant* Export `GetHeaders'`
55 [#1052](https://github.com/haskell-servant/servant/pull/1052)
57- *servant* Add `Bitraversable` and other `Bi-` instances for `:<|>`
58 [#1032](https://github.com/haskell-servant/servant/pull/1032)
60- *servant* Add `PutCreated` method type alias
61 [#1024](https://github.com/haskell-servant/servant/pull/1024)
63- *servant* Add `ToSourceIO (NonEmpty a)` instance
64 [#988](https://github.com/haskell-servant/servant/pull/988)
660.14.1
67------
69- Merge in `servant-generic` (by [Patrick Chilton](https://github.com/chpatrick))
70 into `servant` (`Servant.API.Generic`),
71 `servant-client-code` (`Servant.Client.Generic`)
72 and `servant-server` (`Servant.Server.Generic`).
74- *servant-server* Deprecate `Servant.Utils.StaticUtils`, use `Servant.Server.StaticUtils`.
760.14
77----
79- `Stream` takes a status code argument
81 ```diff
82 -Stream method framing ctype a
83 +Stream method status framing ctype a
84 ```
86 ([#966](https://github.com/haskell-servant/servant/pull/966)
87 [#972](https://github.com/haskell-servant/servant/pull/972))
89- `ToStreamGenerator` definition changed, so it's possible to write an instance
90 for conduits.
92 ```diff
93 -class ToStreamGenerator f a where
94 - toStreamGenerator :: f a -> StreamGenerator a
95 +class ToStreamGenerator a b | a -> b where
96 + toStreamGenerator :: a -> StreamGenerator b
97 ```
99 ([#959](https://github.com/haskell-servant/servant/pull/959))
101- Added `NoFraming` streaming strategy
102 ([#959](https://github.com/haskell-servant/servant/pull/959))
104- *servant-server* File serving in polymorphic monad.
105 i.e. Generalised types of `serveDirectoryFileServer` etc functions in
106 `Servant.Utils.StaticFiles`
107 ([#953](https://github.com/haskell-servant/servant/pull/953))
109- *servant-server* `ReqBody` content type check is recoverable.
110 This allows writing APIs like:
112 ```haskell
113 ReqBody '[JSON] Int :> Post '[PlainText] Int
114 :<|> ReqBody '[PlainText] Int :> Post '[PlainText] Int
115 ```
117 which is useful when handlers are subtly different,
118 for example may do less work.
119 ([#937](https://github.com/haskell-servant/servant/pull/937))
1220.13.0.1
123--------
125- Support `base-compat-0.10`
1270.13
128----
130- Streaming endpoint support.
131 ([#836](https://github.com/haskell-servant/servant/pull/836))
132- *servant* Add `Servant.API.Modifiers`
133 ([#873](https://github.com/haskell-servant/servant/pull/873))
1350.12
136----
138### Breaking changes
140* Added `hoistServer` member to the `HasServer` class, which is `HasServer`
141 specific `enter`.
142 ([#804](https://github.com/haskell-servant/servant/pull/804))
1440.11
145----
147### Breaking changes
149* Changed `HasServer` instances for `Header` to throw 400 when parsing fails
150 ([#724](https://github.com/haskell-servant/servant/pull/724))
151* Added `headersD` block to `Delayed`
152 ([#724](https://github.com/haskell-servant/servant/pull/724))
154### Other changes
156* Add `err418`, `err422` error codes
157 ([#739](https://github.com/haskell-servant/servant/pull/739))
1590.10
160----
162### Breaking changes
164* `Handler` is now an abstract datatype. Migration hint: change `throwE` to `throwError`.
165 ([#641](https://github.com/haskell-servant/servant/issues/641))
167* Changed `HasServer` instances for `QueryParam` and `QueryParam` to throw 400
168 when parsing fails
169 ([#649](https://github.com/haskell-servant/servant/pull/649))
171### Other changes
173* Added `paramsD` block to `Delayed`
175* Add `err422` Unprocessable Entity
176 ([#646](https://github.com/haskell-servant/servant/pull/646))
178* Deprecate `serveDirectory` and introduce `serveDirectoryFileServer`,
179 `serveDirectoryWebApp`, `serveDirectoryWebAppLookup`, `serveDirectoryEmbedded`
180 and `serveDirectoryWith` which offer 4 default options and a more flexible
181 one for serving static files.
182 ([#658](https://github.com/haskell-servant/servant/pull/658))
184* `DelayedIO` is an instance of `MonadResource`, allowing safe resource handling.
185 ([#622](https://github.com/haskell-servant/servant/pull/622)
186 , [#674](https://github.com/haskell-servant/servant/pull/674)
187 , [#675](https://github.com/haskell-servant/servant/pull/675))
1890.7.1
190------
192* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
193* Support GHC 8.0
1950.7
196---
198* The `Router` type has been changed. Static router tables should now
199 be properly shared between requests, drastically increasing the
200 number of situations where servers will be able to route requests
201 efficiently. Functions `layout` and `layoutWithContext` have been
202 added to visualize the router layout for debugging purposes. Test
203 cases for expected router layouts have been added.
204* If an endpoint is discovered to have a non-matching "accept header",
205 this is now a recoverable rather than a fatal failure, allowing
206 different endpoints for the same route, but with different content
207 types to be specified modularly.
208* Export `throwError` from module `Servant`
209* Add `Handler` type synonym
2110.6.1
212-----
214* If servers use the `BasicAuth` combinator and receive requests with missing or
215 invalid credentials, the resulting error responses (401 and 403) could be
216 overwritten by subsequent alternative routes. Now `BasicAuth` uses `FailFatal`
217 and the error responses can't be overwritten anymore.
2190.6
220---
222* Query parameters that can't be parsed result in a `400` (was `404`).
2240.5
225---
227* Add `Config` machinery (https://github.com/haskell-servant/servant/pull/327).
228 This is a breaking change, as the signatures of both `route`, `serve` and the
229 typeclass `HasServer` now take an additional parameter.
230* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
231* Drop `EitherT` in favor of `ExceptT`
232* Use `http-api-data` instead of `Servant.Common.Text`
233* Remove matrix params.
234* Remove `RouteMismatch`.
235* Redefined constructors of `RouteResult`.
236* Added `Delayed` and related functions (`addMethodCheck`, `addAcceptCheck`, `addBodyCheck`, `runDelayed`)
237* Added support for Basic Authentication
238* Add generalized authentication support via the `AuthServerData` type family and `AuthHandler` handler
2400.4.1
241-----
242* Bump attoparsec upper bound to < 0.14
243* Bump wai-app-static upper bound to < 3.2
244* Bump either upper bound to < 4.5
2460.4
247---
248* `Delete` now is like `Get`, `Post`, `Put`, and `Patch` and returns a response body
249* Add a `RouteMismatch` constructor for arbitrary HTTP response codes (https://github.com/haskell-servant/servant-server/pull/22)
250* Add support for the `Patch` combinator
251* Support for `Accept`/`Content-type` headers and for the content-type aware combinators in *servant-0.4*
252* Export `toApplication` from `Servant.Server` (https://github.com/haskell-servant/servant-server/pull/29)
253* Support other Monads than just `EitherT (Int, String) IO` (https://github.com/haskell-servant/servant-server/pull/21)
254* Make methods return status code 204 if they return () (https://github.com/haskell-servant/servant-server/issues/28)
255* Add server support for response headers
256* Use `ServantErr` instead of `(Int,String)` in `EitherT` handlers
257* Add `errXXX` functions for HTTP errors with sensible default reason strings
258* Add `enter` function for applying natural transformations to handlers
2600.2.4
261-----
262* Added support for matrix parameters, see e.g. http://www.w3.org/DesignIssues/MatrixURIs.html
263* Add support for serializing based on Accept header
264 (https://github.com/haskell-servant/servant-server/issues/9)
265* Ignore trailing slashes
266 (https://github.com/haskell-servant/servant-server/issues/5)
2690.2.3
270-----
272* Fix consuming request body issue
273 (https://github.com/haskell-servant/servant/issues/3)
274* Make code sample in Servant.Server complete