lens-2.1: Lenses, Folds and Traversals

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Control.Parallel.Strategies.Lens

Description

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

Synopsis

Documentation

evalOf :: SimpleLensLike Eval a b -> Strategy b -> Strategy aSource

Evaluate the targets of a Lens or Traversal into a data structure according to the given strategy.

 evalTraversable = evalOf traverse = traverse
 evalOf = id
 evalOf :: Simple Lens a b -> Strategy b -> Strategy a
 evalOf :: Simple Traversal a b -> Strategy b -> Strategy a
 evalOf :: (b -> Eval b) -> a -> Eval a) -> Strategy b -> Strategy a

parOf :: SimpleLensLike Eval a b -> Strategy b -> Strategy aSource

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

parTraversable = parOf traverse
 parOf :: Simple Lens a b -> Strategy b -> Strategy a
 parOf :: Simple Traversal a b -> Strategy b -> Strategy a
 parOf :: ((b -> Eval b) -> a -> Eval a) -> Strategy b -> Strategy a

after :: Strategy a -> LensLike f a b c d -> LensLike f a b c dSource

Transform a Lens, Fold, Getter, Setter or Traversal to first evaluates its argument according to a given strategy before proceeding.

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

meanwhile :: Strategy a -> LensLike f a b c d -> LensLike f a b c dSource

Transform a Lens, Fold, Getter, Setter or Traversal to evaluate its argument according to a given strategy in parallel with evaluating.

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