@@ -1,5 +1,152 @@
11[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
22
3+0.15
4+----
5+
6+### Significant changes
7+
8+- Streaming refactoring.
9+ [#991](https://github.com/haskell-servant/servant/pull/991)
10+ [#1076](https://github.com/haskell-servant/servant/pull/1076)
11+ [#1077](https://github.com/haskell-servant/servant/pull/1077)
12+
13+ The streaming functionality (`Servant.API.Stream`) is refactored to use
14+ `servant` own `SourceIO` type (see `Servant.Types.SourceT` documentation),
15+ which replaces both `StreamGenerator` and `ResultStream` types.
16+
17+ New conversion type-classes are `ToSourceIO` and `FromSourceIO`
18+ (replacing `ToStreamGenerator` and `BuildFromStream`).
19+ There are instances for *conduit*, *pipes* and *machines* in new packages:
20+ [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
21+ [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
22+ [servant-machines](https://hackage.haskell.org/package/servant-machines)
23+ respectively.
24+
25+ Writing new framing strategies is simpler. Check existing strategies for examples.
26+
27+ This change shouldn't affect you, if you don't use streaming endpoints.
28+
29+- *servant-client* Separate streaming client.
30+ [#1066](https://github.com/haskell-servant/servant/pull/1066)
31+
32+ We now have two `http-client` based clients,
33+ in `Servant.Client` and `Servant.Client.Streaming`.
34+
35+ Their API is the same, except for
36+ - `Servant.Client` **cannot** request `Stream` endpoints.
37+ - `Servant.Client` is *run* by direct
38+ `runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)`
39+ - `Servant.Client.Streaming` **can** request `Stream` endpoints.
40+ - `Servant.Client.Streaming` is *used* by CPSised
41+ `withClientM :: ClientM a -> ClientEnv -> (Either ServantError a -> IO b) -> IO b`
42+
43+ To access `Stream` endpoints use `Servant.Client.Streaming` with
44+ `withClientM`; otherwise you can continue using `Servant.Client` with `runClientM`.
45+ You can use both too, `ClientEnv` and `BaseUrl` types are same for both.
46+
47+ **Note:** `Servant.Client.Streaming` doesn't *stream* non-`Stream` endpoints.
48+ Requesting ordinary `Verb` endpoints (e.g. `Get`) will block until
49+ the whole response is received.
50+
51+ There is `Servant.Client.Streaming.runClientM` function, but it has
52+ restricted type. `NFData a` constraint prevents using it with
53+ `SourceT`, `Conduit` etc. response types.
54+
55+ ```haskell
56+ runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ServantError a)
57+ ```
58+
59+ This change shouldn't affect you, if you don't use streaming endpoints.
60+
61+- Drop support for GHC older than 8.0
62+ [#1008](https://github.com/haskell-servant/servant/pull/1008)
63+ [#1009](https://github.com/haskell-servant/servant/pull/1009)
64+
65+- `ComprehensiveAPI` is a part of public API in `Servant.Test.ComprehensiveAPI`` module.
66+ This API type is used to verify that libraries implement all core combinators.
67+ Now we won't change this type between major versions.
68+ (This has been true for some time already).
69+ [#1070](https://github.com/haskell-servant/servant/pull/1070)
70+
71+- Remove `Servant.Utils.Enter` module
72+ (deprecated in `servant-0.12` in favour of `hoistServer`)
73+ [#996](https://github.com/haskell-servant/servant/pull/996)
74+
75+### Other changes
76+
77+- *servant-client-core* Add `NFData (GenResponse a)` and `NFData ServantError` instances.
78+ [#1076](https://github.com/haskell-servant/servant/pull/1076)
79+
80+- *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a`
81+ [#1064](https://github.com/haskell-servant/servant/pull/1064)
82+
83+- *servant-foreign* Add support so `HasForeign` can be implemented for
84+ `MultipartForm` from [`servant-multipart`](http://hackage.haskell.org/package/servant-multipart)
85+ [#1035](https://github.com/haskell-servant/servant/pull/1035)
86+
87+- *servant-server* Add `MonadMask Handler`
88+ [#1068](https://github.com/haskell-servant/servant/pull/1068)
89+
90+- *servant-docs* Fix markdown indentation
91+ [#1043](https://github.com/haskell-servant/servant/pull/1043)
92+
93+- *servant* Export `GetHeaders'`
94+ [#1052](https://github.com/haskell-servant/servant/pull/1052)
95+
96+- *servant* Add `Bitraversable` and other `Bi-` instances for `:<|>`
97+ [#1032](https://github.com/haskell-servant/servant/pull/1032)
98+
99+- *servant* Add `PutCreated` method type alias
100+ [#1024](https://github.com/haskell-servant/servant/pull/1024)
101+
102+- *servant-client-core* Add `aeson` and `Lift BaseUrl` instances
103+ [#1037](https://github.com/haskell-servant/servant/pull/1037)
104+
105+- Add `ToSourceIO (NonEmpty a)` instance
106+ [#988](https://github.com/haskell-servant/servant/pull/988)
107+
108+- Development process improvements
109+ - Apply `stylish-haskell` to all modules
110+ [#1001](https://github.com/haskell-servant/servant/pull/1001)
111+ - Amend `CONTRIBUTING.md`
112+ [#1036](https://github.com/haskell-servant/servant/pull/1036)
113+ - `servant-docs` has golden tests for `ComprehensiveAPI`
114+ [#1071](https://github.com/haskell-servant/servant/pull/1071)
115+ - Other
116+ [#1039](https://github.com/haskell-servant/servant/pull/1039)
117+ [#1046](https://github.com/haskell-servant/servant/pull/1046)
118+ [#1062](https://github.com/haskell-servant/servant/pull/1062)
119+ [#1069](https://github.com/haskell-servant/servant/pull/1069)
120+ [#985](https://github.com/haskell-servant/servant/pull/985)
121+
122+- *Documentation* Tutorial and new recipes
123+ - [Using free client](https://haskell-servant.readthedocs.io/en/latest/cookbook/using-free-client/UsingFreeClient.html)
124+ [#1005](https://github.com/haskell-servant/servant/pull/1005)
125+ - [Generating mock curl calls](https://haskell-servant.readthedocs.io/en/latest/cookbook/curl-mock/CurlMock.html)
126+ [#1033](https://github.com/haskell-servant/servant/pull/1033)
127+ - [Error logging with Sentry](https://haskell-servant.readthedocs.io/en/latest/cookbook/sentry/Sentry.html)
128+ [#987](https://github.com/haskell-servant/servant/pull/987)
129+ - [Hoist Server With Context for Custom Monads](https://haskell-servant.readthedocs.io/en/latest/cookbook/hoist-server-with-context/HoistServerWithContext.html)
130+ [#1044](https://github.com/haskell-servant/servant/pull/1044)
131+ - [How To Test Servant Applications](https://haskell-servant.readthedocs.io/en/latest/cookbook/testing/Testing.html)
132+ [#1050](https://github.com/haskell-servant/servant/pull/1050)
133+ - `genericServeT`: using custom monad with `Servant.API.Generic`
134+ in [Using generics](https://haskell-servant.readthedocs.io/en/latest/cookbook/generic/Generic.html)
135+ [#1058](https://github.com/haskell-servant/servant/pull/1058)
136+ - Tutorial
137+ [#974](https://github.com/haskell-servant/servant/pull/974)
138+ [#1007](https://github.com/haskell-servant/servant/pull/1007)
139+ - miscellanea: fixed typos etc.
140+ [#1030](https://github.com/haskell-servant/servant/pull/1030)
141+ [#1020](https://github.com/haskell-servant/servant/pull/1020)
142+ [#1059](https://github.com/haskell-servant/servant/pull/1059)
143+
144+- *Documentation* README
145+ [#1010](https://github.com/haskell-servant/servant/pull/1010)
146+
147+- *servant-client-ghcjs* updates. **note** package is not released on Hackage
148+ [#938](https://github.com/haskell-servant/servant/pull/938)
149+
31500.14.1
4151------
5152
@@ -10,6 +157,7 @@
10157 and `servant-server` (`Servant.Server.Generic`).
11158
12159- Deprecate `Servant.Utils.Links`, use `Servant.Links`.
160+ [#998](https://github.com/haskell-servant/servant/pull/998)
13161
14162- *servant-server* Deprecate `Servant.Utils.StaticUtils`, use `Servant.Server.StaticUtils`.
15163