HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

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 declaration
typetype Strategy a = a -> ()
#

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).

Application of sequential strategies

2 declarations
valueusing :: a -> Strategy a -> a
#

Evaluate a value using the given strategy.

valuewithStrategy :: Strategy a -> a -> a
#

Evaluate a value using the given strategy. This is simply using with arguments reversed.

Basic sequential strategies

3 declarations

Sequential strategies for lists

3 declarations
valueseqListNth :: Int -> Strategy a -> Strategy [a]
#

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 declarations
valueseqArray :: Strategy a -> Strategy (Array i a)
#

Evaluate the elements of an array according to the given strategy. Evaluation of the array bounds may be triggered as a side effect.

Sequential strategies for tuples

8 declarations

Evaluate the components of a tuple according to the given strategies. No guarantee is given as to the order of evaluation.