From a5d3f44f2a2d639ea99a59e14f40be8e92981b2e Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 9 Nov 2018 19:49:24 +0200 Subject: [PATCH] Add #1076 entry --- servant/CHANGELOG.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/servant/CHANGELOG.md b/servant/CHANGELOG.md index c05dd7b1..7c478e9e 100644 --- a/servant/CHANGELOG.md +++ b/servant/CHANGELOG.md @@ -6,11 +6,11 @@ ### Significant changes - Streaming refactoring. [#991](https://github.com/haskell-servant/servant/pull/991) - + The streaming functionality (`Servant.API.Stream`) is refactored to use `servant` own `SourceIO` type (see `Servant.Types.SourceT` documentation), which replaces both `StreamGenerator` and `ResultStream` types. - + New conversion type-classes are `ToSourceIO` and `FromSourceIO` (replacing `ToStreamGenerator` and `BuildFromStream`). There are instances for *conduit*, *pipes* and *machines* in new packages: @@ -36,7 +36,7 @@ - `Servant.Client.Streaming` is *used* by CPSised `withClientM :: ClientM a -> ClientEnv -> (Either ServantError a -> IO b) -> IO b` - If you need to access `Stream` endpoints use `Servant.Client.Streaming` with + To access `Stream` endpoints use `Servant.Client.Streaming` with `withClientM`; otherwise you can continue using `Servant.Client` with `runClientM`. You can use both too, `ClientEnv` and `BaseUrl` types are same for both. @@ -44,6 +44,14 @@ Requesting ordinary `Verb` endpoints (e.g. `Get`) will block until the whole response is received. + There is `Servant.Client.Streaming.runClientM` function, but it has + restricted type. `NFData a` constraint prevents using it with + `SourceT`, `Conduit` etc. response types. + + ```haskell + runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ServantError a) + ``` + This change shouldn't affect you, if you don't use streaming endpoints. - Drop support for GHC older than 8.0 @@ -51,7 +59,7 @@ [#1009](https://github.com/haskell-servant/servant/pull/1009) - `ComprehensiveAPI` is a part of public API in `Servant.Test.ComprehensiveAPI`` module. - This API type is used to verify that libraries implement all core combinators. + This API type is used to verify that libraries implement all core combinators. Now we won't change this type between major versions. (This has been true for some time already). [#1070](https://github.com/haskell-servant/servant/pull/1070) @@ -62,6 +70,9 @@ ### Other changes +- *servant-client-core* Add `NFData (GenResponse a)` and `NFData ServantError` instances. + [#1076](https://github.com/haskell-servant/servant/pull/1076) + - *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a` [#1064](https://github.com/haskell-servant/servant/pull/1064)