Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of generics use to the docs #6

Open
phadej opened this issue Jul 24, 2018 · 2 comments
Open

Add example of generics use to the docs #6

phadej opened this issue Jul 24, 2018 · 2 comments

Comments

@phadej
Copy link
Contributor

phadej commented Jul 24, 2018

Explain:

fieldHref_
    :: ( HasLink endpoint, IsElem endpoint (ToServantApi routes)
       , GenericServant routes AsApi
       )
    => (routes AsApi -> endpoint)
    -> MkLink endpoint Attribute
fieldHref_ = fieldLink' linkAbsHref_
@rashadg1030
Copy link

Is the code for this already available? Or is this something that should be added? I can work on this since I have a library that depends on this sort of functionality. The more general linkAttribute one at least. This would be nice and allow me to push this out of my library, upstream.

@rashadg1030
Copy link

rashadg1030 commented Nov 5, 2021

Wait nevermind this already included in the latest version but it would be nice to have this for other/custom attributes as well, like you mentioned in #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants