Skip to content
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 support for converting from VL getters and folds #430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arybczak
Copy link
Collaborator

@arybczak arybczak commented Jun 25, 2021

@phadej this is what you wanted in #427.

A small problem here is that foldVL from optics-vl is not the same thing as foldVL from optics-core.


-- | Build a 'Fold' from the van Laarhoven representation.
foldVL :: FoldVL s a -> Fold s a
foldVL o = O.foldVL $ \f -> runTraversed . getConst #. o (Const #. Traversed #. f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. But how to rename foldVL we already have. I don't have any ideas.

Copy link
Collaborator Author

@arybczak arybczak Dec 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foldVL from Optics.Fold used to be named mkFold. How about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants