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

Simon Marlow marlowsd at gmail.com
Tue May 31 13:10:47 CEST 2011


On 28/05/2011 01:56, Tsuyoshi Ito wrote:
> Hello,
>
> I think that the documentation of the parallel package version 3.1.0.1
> 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
> http://hackage.haskell.org/packages/archive/parallel/3.1.0.1/doc/html/Control-Parallel-Strategies.html#v:parMap)
> 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.

Will do, thanks!

Simon



More information about the Libraries mailing list