Skip to content

Commit 507263e

Browse files
committed
Add migration guide for hoistClientMonad
1 parent 0c23287 commit 507263e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

servant/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
Read [tutorial section for more information](https://haskell-servant.readthedocs.io/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
4242
([#936](https://github.com/haskell-servant/servant/pull/936))
4343

44+
iF you have own combinators, you'll need to define a new method of
45+
`HasClient` class, for example:
46+
47+
```haskell
48+
type Client m (MyCombinator :> api) = MyValue :> Client m api
49+
hoistClientMonad pm _ nt cl = hoistClientMonad pm (Proxy :: Proxy api) nt . cl
50+
```
51+
4452
- *servant* Add `safeLink' :: (Link -> a) -> ... -> MkLink endpoint a`,
4553
which allows to create helpers returning something else than `Link`.
4654
([#968](https://github.com/haskell-servant/servant/pull/968))

0 commit comments

Comments
 (0)