Seg Fault

Leon Smith lps@po.cwru.edu
Fri, 23 Aug 2002 02:33:08 -0400


> Probably a stack overflow which, unfortunately, causes Hugs to segfault.

I was suspicious of that, but I wasn't certain.

However, this brings up what I was really after.  In all cases I was using tail
recursion, although the lazy versions still create control context proportional
to n.  (I have a few continuation passing interpreters I wrote that
mysteriously overflow stack, I've been suspicious of unneeded laziness
somewhere...) Although I've mostly been programming in functional programming
languages (SML and Haskell) for the last 4 years, I'm still used to thinking
that the stack is used for activation records.	

Then, what goes on the stack?  I'll venture a guess that Hugs is keeping track
of the current continuation on the stack...

But in a lazy language control context can't always go on the stack...	How can
I, as a programmer, have a good guess when it does and doesn't?


best,
leon