seq
The value of
seq a b is bottom if
a is
bottom, and otherwise equal to
b. In other words, it
evaluates the first argument
a to weak head normal form
(WHNF).
seq is usually introduced to improve performance by
avoiding unneeded laziness.
A note on evaluation order: the expression
seq a b
does
not guarantee that
a will be evaluated before
b. The only guarantee given by
seq is that the both
a and
b will be evaluated before
seq returns
a value. In particular, this means that
b may be evaluated
before
a. If you need to guarantee a specific order of
evaluation, you must use the function
pseq from the
"parallel" package.
Generates a seq using a
Range to determine the length.
Evaluate all values flowing downstream to WHNF
The value of seq a b is bottom if a is bottom, and
otherwise equal to b. In other words, it evaluates the first
argument a to weak head normal form (WHNF). seq is
usually introduced to improve performance by avoiding unneeded
laziness.
A note on evaluation order: the expression seq a b does
not guarantee that a will be evaluated before
b. The only guarantee given by seq is that the both
a and b will be evaluated before seq
returns a value. In particular, this means that b may be
evaluated before a. If you need to guarantee a specific order
of evaluation, you must use the function pseq from the
"parallel" package.
The value of seq a b is bottom if a is bottom, and
otherwise equal to b. seq is usually introduced to
improve performance by avoiding unneeded laziness.
A note on evaluation order: the expression seq a b does
not guarantee that a will be evaluated before
b. The only guarantee given by seq is that the both
a and b will be evaluated before seq
returns a value. In particular, this means that b may be
evaluated before a. If you need to guarantee a specific order
of evaluation, you must use the function pseq from the
"parallel" package.
The value of seq a b is bottom if a is bottom, and
otherwise equal to b. In other words, it evaluates the first
argument a to weak head normal form (WHNF). seq is
usually introduced to improve performance by avoiding unneeded
laziness.
A note on evaluation order: the expression seq a b does
not guarantee that a will be evaluated before
b. The only guarantee given by seq is that the both
a and b will be evaluated before seq
returns a value. In particular, this means that b may be
evaluated before a. If you need to guarantee a specific order
of evaluation, you must use the function pseq from the
"parallel" package.
General-purpose finite sequences.
General-purpose finite sequences.
Various utilities for forcing Core structures
It can often be useful to force various parts of the AST. This module
provides a number of seq-like functions to accomplish this.
Evaluate something. This is used to support :force in GHCi.
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).
Seq. Import as:
import qualified RIO.Seq as Seq
General-purpose finite sequences.