A module-local combinator using Control.Parallel.par behaves differently than when it's imported
There's a moderately long thread@haskell-cafe discussing the problem at:
http://www.haskell.org/pipermail/haskell-cafe/2009-May/061765.html
I will attach the source files and the outputs of compilation with
ghc-6.11.20090421 --make primes-test.hs -threaded -O2 -ddump-simpl
on a 32-bit Ubuntu 2009.4.
What appears to be happening is that GHC generates the call to function `parallelize' as though it was strict, even though the interface declares it as lazy, but only when the function is imported.
The only proof of this, apart from the execution time, is this line of difference between the two -ddump-simpl outputs:
> $diff main.simpl imported.simpl
> ...
> 223c232
> < a_s1rs [ALWAYS Just L] :: GHC.Integer.Internals.Integer
> ---
> > a_s1sV [ALWAYS Just S] :: GHC.Integer.Internals.Integer
> ...