| Haskell Hierarchical Libraries (base package) | Source code | Contents | Index

Control.Parallel |

Portability | non-portable
Stability | experimental
Maintainer | libraries@haskell.org

Description
Parallel Constructs
Synopsis

par :: a -> b -> b
seq :: a -> b -> b

Documentation
par :: a -> b -> b
Indicates that it may be beneficial to evaluate the first argument in parallel with the second. Returns the value of the second argument. `a `par` b` is exactly equivalent semantically to `b`. `par` is generally used when the value of `a` is likely to be required later, but not immediately. Also it is a good idea to ensure that `a` is not a trivial computation, otherwise the cost of spawning it in parallel overshadows the benefits obtained by running it in parallel.

Note that actual parallelism is only supported by certain implementations (GHC with the `-threaded` option, and GPH, for now). On other implementations, `par a b = b`.

seq :: a -> b -> b
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.
Produced by Haddock version 0.8