[GHC] #9332: Memory blowing up for strict sum/strict foldl in ghci
GHC
ghc-devs at haskell.org
Sun Jul 20 09:04:11 UTC 2014
#9332: Memory blowing up for strict sum/strict foldl in ghci
-------------------------------------+-------------------------------------
Reporter: | Owner:
artella.coding | Status: closed
Type: bug | Milestone: 7.8.4
Priority: high | Version: 7.8.3
Component: GHCi | Keywords: ghci, strict,
Resolution: fixed | memory
Differential Revisions: | Operating System: Linux
Architecture: x86_64 | Type of failure: Runtime
(amd64) | performance bug
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by artella.coding):
If I modify the code above to the following, it blows up and this time
using the methods above '''do not''' help :
{{{
--Sort.hs
module Sort (result) where
import Data.List
longList::[Int]
longList = [1 .. ]
result :: Int
result = foldl' (+) 0 $ takeWhile (< 10000000) longList
}}}
{{{
--Main.hs
module Main (main) where
import Sort (result)
main = do
print $ result
}}}
Then running with :
{{{
ghci -fobject-code Main.hs
}}}
results in memory blowing up.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9332#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list