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

Add lenses for config #15

Open
Martoon-00 opened this issue May 21, 2022 · 0 comments · May be fixed by #17 or #18
Open

Add lenses for config #15

Martoon-00 opened this issue May 21, 2022 · 0 comments · May be fixed by #17 or #18
Assignees
Labels
improvement A change or a small addition to the existing functionality

Comments

@Martoon-00
Copy link
Member

Clarification and motivation

It would be very convenient if the configuration could be tuned up with lenses and it is possible to write e.g.

int = mkInt $ defaultInterpolatorOptions &~ do
  defaultSwitchesOptionsL . defSpacesTrimmingL ?= True

Note that we can be lens-compatible without actually depending on lens package and rather declaring our own Lens' type alias.

Acceptance criteria

  • Lenses for every field appearing in config-related types are added.
  • The library does not rely on lens package, nor on microlens package.
  • The tutorial mentions a use case with these lenses.
@Martoon-00 Martoon-00 added the improvement A change or a small addition to the existing functionality label May 21, 2022
@nalkuatov nalkuatov self-assigned this Jun 11, 2022
nalkuatov added a commit that referenced this issue Jun 26, 2022
Problem: It's quite unconvenient to access config-related records'
fields by hand, especially when it comes to nested ones.

Solution: Implement simple `makeLenses` function to derive lenses
for an arbitrary product type and add common lenses operators & types.
@nalkuatov nalkuatov linked a pull request Jun 26, 2022 that will close this issue
8 tasks
nalkuatov added a commit that referenced this issue Jun 26, 2022
Problem: It's quite unconvenient to access config-related records'
fields by hand, especially when it comes to nested ones.

Solution: Implement simple `makeLenses` function to derive lenses
for an arbitrary product type and add common lenses operators & types.
nalkuatov added a commit that referenced this issue Jun 28, 2022
Problem: It's quite inconvenient to access config-related records'
fields by hand, especially when it comes to nested ones.

Solution: Add lenses for config-related types and add common lenses
operators & types.
@nalkuatov nalkuatov linked a pull request Jun 28, 2022 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement A change or a small addition to the existing functionality
Projects
None yet
2 participants