The type Strategy a is a -> ().
Thus, a strategy is a function whose sole purpose it is to evaluate
its argument (either in full or in part).
Moduleparallel-3.3.0.0Haskell2010
Control.Seq
Sequential strategies provide ways to compositionally specify the degree of evaluation of a data type between the extremes of no evaluation and full evaluation. Sequential strategies may be viewed as complementary to the parallel ones (see module Control.Parallel.Strategies).
Contents
Synopsis
- type Strategy
- value using
- value withStrategy
- value r0
- value rseq
- value rdeepseq
- value seqList
- value seqListN
- value seqListNth
- value seqFoldable
- value seqMap
- value seqArray
- value seqArrayBounds
- value seqTuple2
- value seqTuple3
- value seqTuple4
- value seqTuple5
- value seqTuple6
- value seqTuple7
- value seqTuple8
- value seqTuple9
- Packageparallel-3.3.0.0
- Exports21
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceSeq.hs
The sequential strategy type
Application of sequential strategies
Evaluate a value using the given strategy.
Evaluate a value using the given strategy. This is simply using with arguments reversed.
Basic sequential strategies
r0 performs no evaluation.
rseq evaluates its argument to weak head normal form.
rdeepseq fully evaluates its argument. Relies on class NFData from module Control.DeepSeq.
Sequential strategies for lists
Evaluate each element of a list according to the given strategy. This function is a specialisation of seqFoldable to lists.
Evaluate the first n elements of a list according to the given strategy.
Evaluate the nth element of a list (if there is such) according to the given strategy. The spine of the list up to the nth element is evaluated as a side effect.
Sequential strategies for foldable data types
Evaluate the elements of a foldable data structure according to the given strategy.
Evaluate the keys and values of a map according to the given strategies.
Evaluate the elements of an array according to the given strategy. Evaluation of the array bounds may be triggered as a side effect.
Evaluate the bounds of an array according to the given strategy.
Sequential strategies for tuples
Evaluate the components of a tuple according to the given strategies. No guarantee is given as to the order of evaluation.