Closed fosskers closed 4 years ago
I'd feel a bit more comfortable including this as an explicitly imported module like RIO.Lens
instead of including in the main module itself. Some of the names can be confusing, and some (like to
) are more likely to cause a name conflict.
Good point - that should be a fairly easy change. Note that this would induce a major version change, this the existing operators exposed by RIO
would be moved into RIO.Lens
.
There's precedent for having a RIO.*
module which doesn't provide anything to the top-level RIO
. RIO.Process
is such a module - if you want anything from it, you need to add the extra import line. Is the idea that Lens is specific / specialized enough that we'd want none of it exposed in the top-level RIO
?
At the very least, it should probably be "all or nothing", as in, everything re-exported by RIO
(as the STM and concurrency facilities are), or nothing at all, like with RIO.Process
.
I disagree. I think the most common lens stuff which doesn't conflict naming-wise can be exported from RIO
, with the stuff less commonly used or with potential name conflicts exported by RIO.Lens
.
Ah, gotcha. I'll put up a new commit that proposes a reorg.
@snoyberg There, I've added the microlens
extras to a new RIO.Lens
module, and the existing RIO.Prelude.Lens
exports have been extended a bit.
That should do it.
These extended exports should be enough to ensure that most users won't need to depend on
microlens
independently.Note that I've removed the custom reimplementation of
view
, and instead pulled it frommicrolens-mtl
, the transitive deps of which were already inrio
.