Ticket #3259 (closed bug: fixed)
A module-local combinator using Control.Parallel.par behaves differently than when it's imported
|Reported by:||blamario||Owned by:|
|Type of failure:||Difficulty:||Unknown|
|Test Case:||Blocked By:|
Description (last modified by simonpj) (diff)
There's a moderately long thread@haskell-cafe discussing the problem at:
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 > ...