Skip to content

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.

2 participants