#2186: unsafePerformIO prevents space leak?
----------------------+-----------------------------------------------------
Reporter: ravi | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Multiple
Os: Linux |
----------------------+-----------------------------------------------------
Changes (by igloo):
* difficulty: => Unknown
Comment:
I'm not sure I follow. If you do something like
{{{
do bools <- mapM readIORef refs
return (and bools)
}}}
then all the `Bool`s will need to be in memory at once, as all the
`readIORef`s will be run before `mapM` returns, whereas
{{{
and (map (unsafePerformIO . readIORef) refs)
}}}
would run in constant space. Have I misunderstood the problem?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2186#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs