[Haskell-cafe] Stack overflow in ghci

Brent Yorgey byorgey at gmail.com
Wed Oct 17 19:09:20 EDT 2007


On 10/17/07, Maurí­cio <briqueabraque at yahoo.com> wrote:
>
> Hi,
>
> I get this error message when testing a function
> in ghci:
>
>   *** Exception: stack overflow
>
> I admit I didn't care about efficiency when I
> wrote that function, but I'm almost sure it is not
> supposed to eat all my memory. Do I need to say
> something to ghci if I want it to use all
> available memory?
>
> Thanks,
> Maurício


This can also be caused by some code which is more lazy than necessary, if a
huge thunk (= unevaluated expression) is generated which blows the stack
when it is evaluated.  You may want to read this page:

http://haskell.org/haskellwiki/Stack_overflow

You should also feel free to send the code causing trouble to this list, and
someone can help you figure out what is going on.

-Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071017/c6d2b7b8/attachment-0001.htm


More information about the Haskell-Cafe mailing list