parallel package: minor error in the documentation of Control.Parallel.Strategies.parMap

Tsuyoshi Ito tsuyoshi at
Sat May 28 02:56:09 CEST 2011


I think that the documentation of the parallel package version
contains a minor error (I hope that this is the right place to report
such an issue).  Namely, the documentation of
Control.Parallel.Strategies.parMap (see
contains the following remark:

> parMap strat f = withStrategy strat . map f

but this is incorrect.  Being new to Parallel Haskell, I had been
confused by this remark, wondering why this means that the elements
are evaluated in parallel, until I found out that the actual
implementation was:

> parMap strat f = (`using` parList strat) . map f

or equivalently:

  parMap strat f = withStrategy (parList strat) . map f

Please fix the documentation.  Thank you in advance.

Best regards,

  Tsuyoshi Ito
  Institute for Quantum Computing, University of Waterloo

More information about the Libraries mailing list