-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
over' and iover' pretend to work with incompatible optics #473
Comments
treeowl
added a commit
to treeowl/optics
that referenced
this issue
Dec 28, 2022
* `over'`, `iover'`, `set'`, and associated operators previously accepted setters. However, it's impossible to actually modify strictly through a setter; a traversal is needed for that. Restrict the types to require `A_Traversal`, and remove the associated (technically correct but deceptive) `Mapping` instances. * Document the strictness behavior of `set'`. Fixes well-typed#473
treeowl
added a commit
to treeowl/optics
that referenced
this issue
Dec 28, 2022
* `over'`, `iover'`, `set'`, and associated operators previously accepted setters. However, it's impossible to actually modify strictly through a setter; a traversal is needed for that. Restrict the types to require `A_Traversal`, and remove the associated (technically correct but deceptive) `Mapping` instances. * Document the strictness behavior of `set'`. Fixes well-typed#473
treeowl
added a commit
to treeowl/optics
that referenced
this issue
Dec 28, 2022
* `over'`, `iover'`, `set'`, and associated operators previously accepted setters. However, it's impossible to actually modify strictly through a setter; a traversal is needed for that. Restrict the types to require `A_Traversal`, and remove the associated (technically correct but deceptive) `Mapping` instances. * Document the strictness behavior of `set'`. Fixes well-typed#473
treeowl
added a commit
to treeowl/optics
that referenced
this issue
Dec 28, 2022
* `over'`, `iover'`, `set'`, and associated operators previously accepted setters. However, it's impossible to actually modify strictly through a setter; a traversal is needed for that. Restrict the types to require `A_Traversal`, and remove the associated (technically correct but deceptive) `Mapping` instances. * Document the strictness behavior of `set'`. Fixes well-typed#473
treeowl
added a commit
to treeowl/optics
that referenced
this issue
Dec 28, 2022
* `over'`, `iover'`, `set'`, and associated operators previously accepted setters. However, it's impossible to actually modify strictly through a setter; a traversal is needed for that. Restrict the types to require `A_Traversal`, and remove the associated (technically correct but deceptive) `Mapping` instances. * Document the strictness behavior of `set'`. Fixes well-typed#473
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oops. I'm currently working on adding
over'
,iover'
, and relatives tolens
. The choice I've made over there is not to add aSettable Solo
instance, to avoid this very problem. I don't know how these optics work, but the uses ofunwrapIdentity'
in theMapping (Star Identity')
andMapping (IxStar Identity')
instances look really fishy. What goes wrong if those instances are removed, andover'
andiover'
are declared to need traversals rather than setters?Additional surprising uses:
failover'
andifailover'
both do things likeShould those be like this?
or (using
Solo
)While you're in the ballpark,
Identity'
is quite an awkward type, and there's really no need for such complication.The text was updated successfully, but these errors were encountered: