Switch to normal field selectors and generic-lens #562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adopts the approach discussed here:
#465 (comment)
That is:
DuplicateRecordFields
, of course).generic-lens
;lsp
andlsp-test
do this.lsp-types
to define some useful lenses that aren't derived from fields; these go in alsp-types-lens
component.I think the result is... fine?
kcsongor/generic-lens#96 is a pain in some cases, but by and large using the generic lenses is quite nice.
I also tried to just use
OverloadedRecordDot
instead of lenses where I could, since we now support 9.2 as our earliest version. I couldn't quite get rid oflens
inlsp
, it's too useful. I did get rid of it entirely inlsp-types
, which was quite painful in at least one place.This would obviously be a huge breaking change, but I think it's the right direction.