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

Export most-used lens-related operators in a separate module #290

Open
Sorokin-Anton opened this issue Sep 11, 2023 · 0 comments · May be fixed by #291
Open

Export most-used lens-related operators in a separate module #290

Sorokin-Anton opened this issue Sep 11, 2023 · 0 comments · May be fixed by #291
Assignees

Comments

@Sorokin-Anton
Copy link
Contributor

We export ^., .~, type Lens, and some other useful lens-related things. Currently

As in #182, this leads to a dependency on microlens (which is not good), and to names conflict with Control.Lens (which is also bad), so those reexports are marked as deprecated, and in #268 we want to completely remove them.

I still think that in many projects users want to simply use 1-2 predefined lenses (such as e.g. Data.Aeson.Lens), and it's nice to have things like .~.

To avoid extra dependencies, we can implement those operators by ourselves.

To avoid name conflicts, we can export those operators in Universum.Lens which would be not exported by Universum by default.

@Sorokin-Anton Sorokin-Anton self-assigned this Sep 11, 2023
Sorokin-Anton added a commit that referenced this issue Sep 11, 2023
Problem:
As in #290, we want to export lens-related operators
like `(^.)` or `(^?)`, but we don't want to depend on
`microlens` or `lens`.

Solution:
Implement those operators by ourselves, export them in
a separate module to avoid names conflict.

Remove those operators from `Universum` reexports.
@Sorokin-Anton Sorokin-Anton linked a pull request Sep 11, 2023 that will close this issue
13 tasks
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 a pull request may close this issue.

1 participant