lens-5.2.2: Lenses, Folds and Traversals
Copyright(C) 2012-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Parallel.Strategies.Lens

Description

A ReifiedLens or ReifiedTraversal can be used to take the role of Traversable in Control.Parallel.Strategies, enabling those combinators to work with monomorphic containers.

Synopsis

Documentation

evalOf :: LensLike' Eval s a -> Strategy a -> Strategy s Source #

Evaluate the targets of a ReifiedLens or ReifiedTraversal into a data structure according to the given Strategy.

evalTraversable = evalOf traverse = traverse
evalOf = id
evalOf :: Lens' s a -> Strategy a -> Strategy s
evalOf :: Traversal' s a -> Strategy a -> Strategy s
evalOf :: (a -> Eval a) -> s -> Eval s) -> Strategy a -> Strategy s

parOf :: LensLike' Eval s a -> Strategy a -> Strategy s Source #

Evaluate the targets of a ReifiedLens or ReifiedTraversal according into a data structure according to a given Strategy in parallel.

parTraversable = parOf traverse
parOf :: Lens' s a -> Strategy a -> Strategy s
parOf :: Traversal' s a -> Strategy a -> Strategy s
parOf :: ((a -> Eval a) -> s -> Eval s) -> Strategy a -> Strategy s

after :: Strategy s -> LensLike f s t a b -> LensLike f s t a b Source #

Transform a ReifiedLens, ReifiedFold, ReifiedGetter, ReifiedSetter or ReifiedTraversal to first evaluates its argument according to a given Strategy before proceeding.

after rdeepseq traverse :: Traversable t => Strategy a -> Strategy [a]

throughout :: Strategy s -> LensLike f s t a b -> LensLike f s t a b Source #

Transform a ReifiedLens, ReifiedFold, ReifiedGetter, ReifiedSetter or ReifiedTraversal to evaluate its argument according to a given Strategy in parallel with evaluating.

throughout rdeepseq traverse :: Traversable t => Strategy a -> Strategy [a]