haskell-servant / haskell-servant/servant
Split up HasServer, HasClient
Open
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
For unit-testing, we need `HasClient` instance that gives us `clientWithRoute`, but the instance does not require a `RunClient` instance.
The easy solution is to write a `RunClient` instance using `undefined`, but it would be nicer to keep separate things separate:
```
type HasClient m api = (RunClient m, HasClient' m api)
class HasClient' m api where ...
```
... and then require `RunClient` where necessary in order to implement the `HasClient'` instance, instead of in the class.
Any concerns or objections? If not I may make a PR.
(ping @pcapriotti)
Contributor guide
Assessment
This issue has not been assessed yet.