[GHC] #3259: A module-local combinator using Control.Parallel.par behaves differently than when it's imported

GHC trac at galois.com
Sun May 24 21:30:00 EDT 2009


#3259: A module-local combinator using Control.Parallel.par behaves differently
than when it's imported
---------------------+------------------------------------------------------
Reporter:  blamario  |          Owner:          
    Type:  bug       |         Status:  new     
Priority:  normal    |      Component:  Compiler
 Version:  6.11      |       Severity:  normal  
Keywords:            |       Testcase:          
      Os:  Linux     |   Architecture:  x86     
---------------------+------------------------------------------------------
 There's a moderately long thread at 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
 > ...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3259>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list