Re: [Haskell-cafe] RE: simple function: stack overflow in hugsvsnonein ghc

2007-09-25 Thread Claus Reinke
return (replicate 100 'a') = \x-print $ spant (const True) x ERROR - Garbage collection fails to reclaim sufficient space i.e. as the function unfold, the thunk representing the second term builds up on the heap. (not sure why it works for an infinite list, hugs must drop the reference to

Re: [Haskell-cafe] RE: simple function: stack overflow in hugsvsnonein ghc

2007-09-24 Thread Claus Reinke
return (replicate 100 'a') = \x-print $ spant (const True) x ERROR - Garbage collection fails to reclaim sufficient space i.e. as the function unfold, the thunk representing the second term builds up on the heap. true. i've often wanted a copy pseudo-function that would avoid updating