Closed tonymorris closed 9 years ago
lens
has a dozen of these little classes.
Swapped
is pretty small, and has no weird instances to worry about.
Reversing
would have a bunch of dependencies. vector
, text
, bytestring
, etc.
But whenever this comes up, folks inevitably want all the FunctorWithIndex
, FoldableWithIndex
, TraversableWithIndex
, Each
, Ixed
, At
...
By the time you get done sliding down the slippery slope with that we get right back where we are with dependencies and its even harder for us to work.
For Swapped
, could that be moved to bifunctors
? That would at least solve this issue.
Ah, the issue is probably that this would add a profunctors
dependency to bifunctors
I'm going to close this as I just don't see this happening at this point.
I am currently toying with the idea of making libraries not depend on the
lens
package, but instead, depend on smaller packages likeprofunctor
.This means I must also forgo type-class instances e.g.
Swapped
andReversing
fromControl.Lens.Iso
. Perhaps these type-classes can go in their own package? Is there an appropriate way of lessening the dependency onlens
while achieving the benefits of things likeSwapped
?