serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
174 stars 26 forks source link

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

Open Sorokin-Anton opened 10 months ago

Sorokin-Anton commented 10 months ago

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

As in https://github.com/serokell/universum/issues/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 https://github.com/serokell/universum/issues/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.