seq +parallel

seqArray :: Ix i => Strategy a -> Strategy (Array i a)
parallel Control.Seq
Evaluate the elements of an array according to the given strategy. Evaluation of the array bounds may be triggered as a side effect.
seqArrayBounds :: Ix i => Strategy i -> Strategy (Array i a)
parallel Control.Seq
Evaluate the bounds of an array according to the given strategy.
seqFoldable :: Foldable t => Strategy a -> Strategy (t a)
parallel Control.Seq
Evaluate the elements of a foldable data structure according to the given strategy.
seqList :: Strategy a -> Strategy [a]
parallel Control.Parallel.Strategies
DEPRECATED: renamed to evalList
seqList :: Strategy a -> Strategy [a]
parallel Control.Seq
Evaluate each element of a list according to the given strategy. This function is a specialisation of seqFoldable to lists.
seqListN :: Int -> Strategy a -> Strategy [a]
parallel Control.Seq
Evaluate the first n elements of a list according to the given strategy.
seqListNth :: Int -> Strategy a -> Strategy [a]
parallel Control.Seq
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.
seqMap :: Strategy k -> Strategy v -> Strategy (Map k v)
parallel Control.Seq
Evaluate the keys and values of a map according to the given strategies.
seqPair :: Strategy a -> Strategy b -> Strategy (a, b)
parallel Control.Parallel.Strategies
DEPRECATED: renamed to evalTuple2
seqTraverse :: Traversable t => Strategy a -> Strategy (t a)
parallel Control.Parallel.Strategies
DEPRECATED: renamed to evalTraversable
seqTriple :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parallel Control.Parallel.Strategies
DEPRECATED: renamed to evalTuple3
seqTuple2 :: Strategy a -> Strategy b -> Strategy (a, b)
parallel Control.Seq
seqTuple3 :: Strategy a -> Strategy b -> Strategy c -> Strategy (a, b, c)
parallel Control.Seq
seqTuple4 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy (a, b, c, d)
parallel Control.Seq
seqTuple5 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy e -> Strategy (a, b, c, d, e)
parallel Control.Seq
seqTuple6 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy e -> Strategy f -> Strategy (a, b, c, d, e, f)
parallel Control.Seq
seqTuple7 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy e -> Strategy f -> Strategy g -> Strategy (a, b, c, d, e, f, g)
parallel Control.Seq
seqTuple8 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy e -> Strategy f -> Strategy g -> Strategy h -> Strategy (a, b, c, d, e, f, g, h)
parallel Control.Seq
seqTuple9 :: Strategy a -> Strategy b -> Strategy c -> Strategy d -> Strategy e -> Strategy f -> Strategy g -> Strategy h -> Strategy i -> Strategy (a, b, c, d, e, f, g, h, i)
parallel Control.Seq
module Control.Seq
parallel 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).
type SeqStrategy a = Strategy a
parallel Control.Parallel.Strategies
a name for Control.Seq.Strategy, for documetnation only.
evalSeq :: SeqStrategy a -> Strategy a
parallel Control.Parallel.Strategies
Inject a sequential strategy (ie. coerce a sequential strategy to a general strategy). Thanks to evalSeq, the type Control.Seq.Strategy a is a subtype of Strategy a.
pseq :: a -> b -> b
parallel Control.Parallel
Semantically identical to seq, but with a subtle operational difference: seq is strict in both its arguments, so the compiler may, for example, rearrange a `seq` b into b `seq` a `seq` b. This is normally no problem when using seq to express strictness, but it can be a problem when annotating code for parallelism, because we need more control over the order of evaluation; we may want to evaluate a before b, because we know that b has already been sparked in parallel with par. This is why we have pseq. In contrast to seq, pseq is only strict in its first argument (as far as the compiler is concerned), which restricts the transformations that the compiler can do, and ensures that the user can retain control of the evaluation order.
rdeepseq :: NFData a => Strategy a
parallel Control.Parallel.Strategies
rdeepseq fully evaluates its argument. > rdeepseq == evalSeq Control.Seq.rdeepseq
rdeepseq :: NFData a => Strategy a
parallel Control.Seq
rdeepseq fully evaluates its argument. Relies on class NFData from module Control.DeepSeq.
rseq :: Strategy a
parallel Control.Seq
rseq evaluates its argument to weak head normal form.
rseq :: Strategy a
parallel Control.Parallel.Strategies
rseq evaluates its argument to weak head normal form. > rseq == evalSeq Control.Seq.rseq