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

Microlens exports conflict with Lens #180

Open
SomeDer opened this issue May 21, 2019 · 4 comments
Open

Microlens exports conflict with Lens #180

SomeDer opened this issue May 21, 2019 · 4 comments

Comments

@SomeDer
Copy link

SomeDer commented May 21, 2019

I needed to install lens as microlens has too few features. However, RIO exports microlens functions which conflict with the lens functions. This means I have to add a hiding line to every RIO import, which is inconvenient. I think the lens functions should be provided by a separate module, to help avoid this.

@akhra
Copy link
Collaborator

akhra commented Jul 9, 2019

We could instead provide RIO.LensFree to satisfy this case, as it does seem likely to come up fairly often. I worry about the precedent, though.

A simple local solution would be to define it yourself:

module RIO.LensFree (module RIO) where
import RIO hiding (<lens stuff>)

@hanjoosten
Copy link

I ran into this very issue. I wasn't hindered by any knowledge about this, and assumed importing RIO was safe. As it turns out, importing RIO without hiding stuff will likely break a build with using cabal. See AmpersandTarski/Ampersand#1142

@tonicebrian
Copy link

Is there a way to hide RIO.Lens completely? I think that 90% of the time I will use advanced features and I don't want to hide specific functions but RIO.Lens altogether.

@ncaq
Copy link

ncaq commented Jan 20, 2023

I am thinking that I could bundle the real lens with it.

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

No branches or pull requests

5 participants