git.iko.soy/typeable/servant
on master help sign in
Open up significant changes in 0.12 [ci skip]
commit0813957b43a11319083579ddce16cb36f80eee86 authorOleg Grenrus <oleg.grenrus@iki.fi> dateWed 8 Nov 2017, 10:17 (9 years ago) parent4d85117
1 file changed+43
servant/CHANGELOG.md+43
servant/CHANGELOG.md+43
@@ -10,15 +10,58 @@
1010 independent of the `http-client` backend.
1111 ([#803](https://github.com/haskell-servant/servant/pull/803)
1212 [#821](https://github.com/haskell-servant/servant/issues/821))
13+
14+ If you have own combinators, you'll need to add an additional `m` argument
15+ in `HasClient`, `Client` and `clientWithRoute`:
16+
17+ ```diff
18+ -class HasClient api
19+ - type Client (api :: *) :: *
20+ - clientWithRoute :: Proxy api -> Req -> Client api
21+ +class HasClient m api
22+ + type Client (m :: * -> *) (api :: *) :: *
23+ + clientWithRoute :: Proxy m -> Proxy api -> Request -> Client m api
24+ ```
25+
26+ See https://github.com/haskell-servant/servant-auth/pull/67/commits/f777818e3cc0fa3ed2346baff8328e96d62b1790 for a real world example.
27+
1328- *servant-server* Added `hoistServer` member to the `HasServer` class, which is `HasServer`
1429 specific `enter`.
1530 ([#804](https://github.com/haskell-servant/servant/pull/804)
1631 [#824](https://github.com/haskell-servant/servant/pull/824))
32+
33+ `enter` isn't exported from `Servant` module anymore. You can change
34+ `enter` to `hoistServer` in a straight forward way.
35+ Unwrap natural transformation and add a api type `Proxy`:
36+
37+ ```diff
38+ -server = enter (NT nt) impl
39+ +server = hoistServer (Proxy :: Proxy MyApi) nt impl
40+ ```
41+
42+ If you have own combinators, you'll need to define a new method of
43+ `HasServer` class, for example:
44+
45+ ```haskell
46+ type ServerT (MyCombinator :> api) m = MyValue -> ServerT api m
47+ hoistServerWithContext _ pc nt s = hoistServerWithContext (Proxy :: Proxy api) pc nt . s
48+ ```
49+
50+ See https://github.com/haskell-servant/servant-auth/pull/67/commits/8ee3b6315247ac076516213fd7cfcdbfdb583ac9 for a real world example.
51+
1752- Add `Description` and `Summary` combinators
1853 ([#767](https://github.com/haskell-servant/servant/pull/767))
54+
55+ It's possible to annotate endpoints with free form text.
56+ This information is used by e.g. by `servant-swagger`, see screenshot in
57+ https://github.com/phadej/servant-swagger-ui
58+
1959- Lower `:>` and `:<|>` infix precedence to 4 and 3 respectively
2060 ([#761](https://github.com/haskell-servant/servant/issues/761))
2161
62+ This should affect you, except if you define your own infix operators
63+ for Servant type-level DSL.
64+
2265### Other changes
2366
2467- *servant-foreign* Derive `Data` for all types