lens-1.1: Families of 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

evalTraversal :: LensLike Eval a a b b -> Strategy b -> Strategy aSource

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

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

parTraversal :: LensLike Eval a a b 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 = parTraversal traverse
 parTraversal l s = l (rparWith s)
 parTraversal :: Simple Lens a b -> Strategy b -> Strategy a
 parTraversal :: Simple Traversal a b -> Strategy b -> Strategy a
 parTraversal :: ((b -> Eval b) -> a -> Eval a) -> Strategy b -> Strategy a