The code main = print $ foldl (+) 0 [1..1000000]
when compiled (without optimizations) results in a stack overflow, which is expected. However, when run from ghci it succeeds. Why is it so? (Tested with GHC 6.12.something and 7.0.4) Is it related to "stack-squeezing"? I couldn't find any description of it, apart from a few bug reports. A related question: how can I control the stack size in evaluations inside ghci? Is it (roughly) the same as setting the ghci's own stack size by passing -K to it in the command line? -- Roman I. Cheplyaka :: http://ro-che.info/ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users