Is it possible to increase the size of the control stack in HUGS? For
instance, on my machine foldr (+) 0 [1..n] runs out of control stack at n
= 3991: 

        Prelude> foldr (+) 0 [1..3990]
        7962045

        Prelude> foldr (+) 0 [1..3991]
        ERROR: Control stack overflow

The HUGS documentation indicates how to increase heap size but not how to
increase stack size. Is there a way of doing this?

(Note: I realize that it may be possible to avoid the control stack
problem by changing to a tail-recursive algorithm. But in the particular
problem I'm interested in, I don't want to change the algorithm -- I just
want to increase the resources that the algorithm can use.) 

Thanks!

Franklyn Turbak 


Reply via email to