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

Enhance GenLens to support select chains i.e. _.a.b.c #204

Merged
merged 1 commit into from
Apr 9, 2015

Conversation

cvogt
Copy link
Contributor

@cvogt cvogt commented Apr 8, 2015

hi from @xdotai :)

@julien-truffaut
Copy link
Member

@cvogt really nice, thank you.

Could you tell me what error message do you get if an accessor along the chain is not a case class accessor?

@cvogt
Copy link
Contributor Author

cvogt commented Apr 9, 2015

Well something like GenLens[A](_.b.c.d) is simply expanded into GenLens[A](_.b) composeLens GenLens[B](_.c) composeLens GenLens[C](_.d) (assuming .b: B, .c:C). You tell me what Monocle does when you try to use GenLens on a non-case class field :). I didn't check.

julien-truffaut added a commit that referenced this pull request Apr 9, 2015
Enhance GenLens to support select chains i.e. _.a.b.c
@julien-truffaut julien-truffaut merged commit c7ba1f3 into optics-dev:master Apr 9, 2015
@cvogt cvogt deleted the GenLens-chains branch April 9, 2015 16:24
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

Successfully merging this pull request may close these issues.

None yet

2 participants