Skip to content

Comments

Add support for converting from VL getters and folds#430

Open
arybczak wants to merge 1 commit intomasterfrom
complete-vl
Open

Add support for converting from VL getters and folds#430
arybczak wants to merge 1 commit intomasterfrom
complete-vl

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.

2 participants