Closed DanBurton closed 12 years ago
I've "fixed" this by removing the default fallback of (++ "Lens")
. Now, the default is to create lenses for underscore-prefixed fields only. The "example usage" of mkLensesBy
now demonstrates how to generate lenses for all fields by appending "L":
$(mkLensesBy (\n -> Just (n ++ "L")) ''Foo)
Lens.Family[2].Stock lenses use the convention of
fooL
, while Lens.Family.TH will createfooLens
for a record field namedfoo
. While I believe underscore-prefixed fields should retain the same behavior, it would be wise to cause the other behavior to agree with Stock, whether that be changing Stock lenses to spell out the full word, or change generated lenses to not.