konsumlamm / rrb-vector

An implementation of a Relaxed Radix Balanced Vector in Haskell.
BSD 3-Clause "New" or "Revised" License
23 stars 5 forks source link

lens type-classes instances #3

Open yairchu opened 3 years ago

yairchu commented 3 years ago

Supporting the appropriate type-classes from lens like Seq does could make transitioning from Seq to Vector as simple as just changing the used type constructor for code using lens.

konsumlamm commented 3 years ago

That's a nice idea, but I don't want to add too many dependencies (and lens has a lot). Note that I already have instances for indexed-traversable (which is reexported by lens) and the other instances should be easy to implement.

I wouldn't be opposed to an rrb-vector-lens package which adds orphan instances for the lens type classes, or an optional dependency on lens (but I'm not sure how/if that works).