haskell-servant / haskell-servant/servant

Split up HasServer, HasClient

Open
#1,731 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.