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

Document profunctor-lens usage? #5

Open
jamesdbrock opened this issue Sep 15, 2020 · 1 comment
Open

Document profunctor-lens usage? #5

jamesdbrock opened this issue Sep 15, 2020 · 1 comment

Comments

@jamesdbrock
Copy link
Member

https://pursuit.purescript.org/packages/purescript-profunctor-lenses/

@jamesdbrock
Copy link
Member Author

To support profunctor-lenses, what we would want to do is to code-generate a lens for each field name.

https://thomashoneyman.com/articles/practical-profunctor-lenses-optics/#lenses

-- This lens focuses on the "name" field of a record; we have to construct
-- this one ourselves.
_name :: forall a r. Lens' { name :: a | r } a
_name = prop (SProxy :: SProxy "name")

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

No branches or pull requests

1 participant