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

Copyright(c) 2014, Aleksey Kliger
LicenseBSD3 (See LICENSE)
MaintainerAleksey Kliger
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unbound.Generics.LocallyNameless.Internal.Fold

Description

| Some utilities for working with Folds.

Documentation

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

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

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

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

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