kenbot / goggles

Pleasant, yet principled Scala optics DSL
MIT License
196 stars 7 forks source link

.name syntax should generate minimal optics structure #3

Closed kenbot closed 7 years ago

kenbot commented 7 years ago

Currently, .name generates a monocle.Lens for a full case-class field.

For "get": It should work for any no-arg method, and generate a monocle.Getter.

For "set": It should work for anything with a copy method with a parameter of the appropriate name, where there is a named parameter with the same name. It should generate a monocle.Setter, returning whatever the copy method returns.

For "lens": It should continue to generate a full monocle.Lens.

kenbot commented 7 years ago

Done