[Haskell-cafe] Space leak with unsafePerformIO

Henning Thielemann lemming at henning-thielemann.de
Sat Jun 26 13:52:21 EDT 2010


Attached is a program with a space leak that I do not understand. I have
coded a simple 'map' function, once using unsafePerformIO and once
without. UnsafePerformIO has a space leak in some circumstances. In the
main program I demonstrate cases with and without space leak. Without
space leak the program writes a file to the disk until it is full. Any idea?

The original problem is a function that is compiled by LLVM and shall be
applied to a list in a mapAccumL manner.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InterleaveIO.hs
Type: text/x-haskell
Size: 1948 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100626/2991bf00/InterleaveIO.bin


More information about the Haskell-Cafe mailing list