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.2.2.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 complimentary to the parallel ones (see module Control.Parallel.Strategies).
- 1 type
- 20 values
- Packageparallel-3.2.2.0
- Exports21
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceSeq.hs
The sequential strategy type
1 declarationApplication of sequential strategies
2 declarationsEvaluate a value using the given strategy.
Evaluate a value using the given strategy. This is simply using with arguments reversed.
Basic sequential strategies
3 declarationsr0 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
3 declarationsEvaluate 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
4 declarationsEvaluate 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
8 declarationsEvaluate the components of a tuple according to the given strategies. No guarantee is given as to the order of evaluation.