unbound-generics-0.1: Reimplementation of Unbound using GHC Generics

Stabilityexperimental
MaintainerAleksey Kliger
Safe HaskellSafe-Inferred

Unbound.Generics.LocallyNameless.Internal.Fold

Description

Some utilities for working with Folds.

If you are using lens, you don't need this module.

Documentation

type Fold s a = forall f. (Contravariant f, Applicative f) => (a -> f a) -> s -> f sSource

type Traversal' s a = forall f. Applicative f => (a -> f a) -> s -> f sSource

toListOf :: Fold s a -> s -> [a]Source

filtered :: (a -> Bool) -> Traversal' a aSource

justFiltered :: (a -> Maybe b) -> Fold a bSource

foldMapOf :: Getting r s a -> (a -> r) -> s -> rSource