How it works...

There are two primitives--rpar, which immediately returns, and rseq, which forces the argument into weak headed normal form (WHNF. WHNF is related to lazy evaluation in Haskell, and usually points to a minimally evaluated thunk. In WHNF, only a part of the thunk is evaluated, whereas in normal form (NF), the whole thunk is evaluated (or reduced). Both rpar and rseq work as Strategies. We specify the work in terms of Strategies in an Eval monad. The runEval function takes the Eval monad and parallelizes the computation.

This recipe also shows how to profile the project, and look at the event log. This comes in very handy especially when dealing with concurrency.