Closed ocharles closed 1 year ago
(I've transferred this issue to linear
, since I think that was the intended repo to open the issue against.)
Whoops, not sure how that happened! Thanks.
As far as the question raised in the issue goes, this package does seem to have a convention of using simple Lens
es and Iso
s everywhere. I'm not sure if this is a deliberate choice or just a coincidence, however—I'd have to let someone more familiar with the history of the library chime in.
@ekmett Could I get your input here? I just ran into this again wanting to write:
over _Point (view _xy)
but that doesn't type check. Using over coerced (view _xy)
doesn't work here because coerced
is too general.
I think there was an example where the type change caused some inference pain, but it was super early on when the combinators for extracting from a lens was too polymorphic, so I think it'd be fine to change to an Iso.
Cool I'll open a PR
Is there any reason
_Point
can't change the type of vector-space? Naturally we can't change the dimensions, but changing the underlying element type?