Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-08 Thread Daniel Fischer
On Friday 08 July 2011, 11:29:40, Ketil Malde wrote: > Max Bolingbroke writes: > >> Stack space overflow: current size 8388608 bytes. > >> Use `+RTS -Ksize -RTS' to increase it. > >> > >> I want to find out the culprit function and rewrite it > >> tail-recursively. Is there a way to find out whic

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-08 Thread Ketil Malde
John Lato writes: >> I want to find out the culprit function and rewrite it tail-recursively. Is >> there a way to find out which function is causing this error other >> than reviewing the code manually? > I'd like to point out that a stack-space overflow in Haskell isn't quite the > same thing

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-08 Thread Ketil Malde
Max Bolingbroke writes: >> Stack space overflow: current size 8388608 bytes. >> Use `+RTS -Ksize -RTS' to increase it. >> I want to find out the culprit function and rewrite it tail-recursively. Is >> there a way to find out which function is causing this error other >> than reviewing the code m

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread John Lato
> From: Logo Logo > > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causing this error other

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread Roman Cheplyaka
Hi Don, I find this answer confusing. The SO question you're linking to is about heap size, not stack overflow. The stack size in this example is 8M. The whole heap size may be much bigger (and increasing the stack size may actually remove the overflow). It would be interesting to learn about su

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread Max Bolingbroke
On 4 July 2011 16:44, Logo Logo wrote: > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causi

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread Chris Smith
You can use the heap profiling options in GHC to find out what is using all the memory. You'll want to compile with -prof and -rtsopts, and then invoke the program with +RTS -h, where is one of 'c', 'y', or a few others. Then run hp2ps on the resulting .hp file to get a graph of what's using all

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread Don Stewart
Profile!! E.g. http://stackoverflow.com/questions/6429085/haskell-heap-issues-with-parameter-passing-style/6429888#6429888 On Mon, Jul 4, 2011 at 11:44 AM, Logo Logo wrote: > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to inc

[Haskell-cafe] Diagnose stack space overflow

2011-07-04 Thread Logo Logo
Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually?