Closed phipsgabler closed 2 years ago
The problem I have is this:
julia> @lens(_[1:10]) == @lens(_[Base.OneTo(10)]) false julia> @lens(_[1:10]).indices == @lens(_[Base.OneTo(10)]).indices true
arising from the dispatch on a common type in the definition:
==(l1::IndexLens{I}, l2::IndexLens{I}) where {I} = l1.indices == l2.indices
I'm asking if there's a possibility of loosening this to
==(l1::IndexLens, l2::IndexLens) = l1.indices == l2.indices
(and the same for ComposedLens). I think this is sensible, since if index values are considered equal, they (hopefully) should also index to equal things.
ComposedLens
(I am to blame for this my self anyway :P)
Yes this sounds reasonable.
The problem I have is this:
arising from the dispatch on a common type in the definition:
I'm asking if there's a possibility of loosening this to
(and the same for
ComposedLens
). I think this is sensible, since if index values are considered equal, they (hopefully) should also index to equal things.(I am to blame for this my self anyway :P)