-
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
Add failing for traversals #393
base: master
Are you sure you want to change the base?
Conversation
@phadej @adamgundry thoughts? |
I just spent quite a while looking for this, while porting some I'd suggest that this PR should also add a |
I would like to see Additionally, I think we could refine the precondition that the combined optics are disjoint a little more to allow for things like Optics.Fallible
I can make a full PR if you're interested. |
Maybe it should be named |
We have
adjoin
, might as well addfailing
.The awkwardness here is about naming, since this PR renames existing
Fold
equivalents.There is also an issue that
afailing
for traversals is safe, whilefailing
for traversals is safe only on disjoint traversals.Perhaps we want a different name than
failing
to avoid a minor API breakage (similar to how we havesumming
for folds andadjoin
for traversals). I have no idea what is a good name though.