[Haskell-cafe] guided seq (Was: Interruptible threads with IO loops)

2011-12-21 Thread Joachim Breitner
Hi, Am Mittwoch, den 21.12.2011, 19:15 +1000 schrieb Gregory Crosswhite: I don't have any tips for cleaning up the code off the top of my head, but I suspect that the memory leak is coming from the fact that the expression (v+1) is not being forced, which means that each iteration of the

Re: [Haskell-cafe] guided seq (Was: Interruptible threads with IO loops)

2011-12-21 Thread Felipe Almeida Lessa
On Wed, Dec 21, 2011 at 7:31 AM, Joachim Breitner m...@joachim-breitner.de wrote: this problem comes up in various places; forcing the whole thunk is of course an option, but would it be possible – theoretical, with the GHC runtime, or even with current tools – to have a function        

Re: [Haskell-cafe] guided seq (Was: Interruptible threads with IO loops)

2011-12-21 Thread wren ng thornton
On 12/21/11 4:31 AM, Joachim Breitner wrote: This would be particularly handy when with, for example snd tuple `evaluateUntilItDoesNotNeed` tuple where the tuple is unevaluated in the right component (and where we don’t want to force this just now), but retains something large in the

Re: [Haskell-cafe] guided seq (Was: Interruptible threads with IO loops)

2011-12-21 Thread Joachim Breitner
Dear Wren, Am Mittwoch, den 21.12.2011, 13:04 -0500 schrieb wren ng thornton: On 12/21/11 4:31 AM, Joachim Breitner wrote: This would be particularly handy when with, for example snd tuple `evaluateUntilItDoesNotNeed` tuple where the tuple is unevaluated in the right component