haskell-servant / haskell-servant/servant

Only type-level `safeLink`?

Open
#1,449 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

There is probably a reason for this, but why isn't it possible to provide `safeLink` with two proxies upfront to make a link-maker like this:
```
apiLink :: forall endpoint. (IsElem endpoint API, HasLink endpoint) => MkLink endpoint Link
apiLink = safeLink (Proxy :: Proxy API) (Proxy :: Proxy endpoint)
```

So it could be used like this: `apiLink @SomeRoute`?

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.