[Haskell-cafe] Parallel Haskell Digest 5

Brandon Allbery allbery.b at gmail.com
Wed Aug 31 11:42:09 CEST 2011

On Wed, Aug 31, 2011 at 03:39, Eric Y. Kow <eric at well-typed.com> wrote:

> (Food for thought: why `parList rseq` instead of `parList r0`?
> Reply to the Haskell-Cafe posting if you think you know why!)

Because with `r0` you're liable to just parallel evaluate to the thunk
containing the computation you're trying to parallelize, and the actual
computation then takes place later *outside* the parallel section?  (That
is, what comes out of parList is a list of the thunks passed to `r0`,
otherwise unevaluated.  You wrapped them in an `id` and then parallel
evaluated the `id` away, real useful that. :)  You need to go at least to
WHNF, then it comes down to the strictness specified in what's passed to

brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110831/eab80fa4/attachment.htm>

More information about the Haskell-Cafe mailing list