You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we found out in #1059, lens does not promise that even its basic features will work with a term of type Lens that is not a well-behaved lens. It seems that, specifically, the terms needed to state that a lens is well-behaved must type check. This is surprising because:
A Lens is nothing but a van Laarhoven presentation of a lens, for which the basic features would work, be it well-behaved or not well-behaved.
It would be fantastic if one did not have to follow Edward's blog post to infer the reasoning behind view not type checking. To this end I say we should add a note to Control.Lens.Lens, right after the definition of the type Lens. Currently, it says:
I cannot say I understand what a lens family is and what the implications of something being a lens family are. Edward's blog post does not contain a clear, compact definition, and to infer one would take days of careful study. Even if Edward's blog post did contain a clear, compact definition, it would go offline one day. The bits needed to understand how a Lens can and cannot be wielded should be given right at its definition.
We should say:
A lens must be of such and such specific type.
Otherwise, some stuff like view will break.
I do not exactly understand what «such and such specific type» is.
The text was updated successfully, but these errors were encountered:
As we found out in #1059,
lens
does not promise that even its basic features will work with a term of typeLens
that is not a well-behaved lens. It seems that, specifically, the terms needed to state that a lens is well-behaved must type check. This is surprising because:Lens
is nothing but a van Laarhoven presentation of a lens, for which the basic features would work, be it well-behaved or not well-behaved.It would be fantastic if one did not have to follow Edward's blog post to infer the reasoning behind
view
not type checking. To this end I say we should add a note toControl.Lens.Lens
, right after the definition of the typeLens
. Currently, it says:I cannot say I understand what a lens family is and what the implications of something being a lens family are. Edward's blog post does not contain a clear, compact definition, and to infer one would take days of careful study. Even if Edward's blog post did contain a clear, compact definition, it would go offline one day. The bits needed to understand how a
Lens
can and cannot be wielded should be given right at its definition.We should say:
view
will break.I do not exactly understand what «such and such specific type» is.
The text was updated successfully, but these errors were encountered: