Skip Navigation

Haskell's problem with exploding call stacks

www.channable.com /tech/haskell-exploding-call-stacks

By default, Haskell does not provide call stacks when errors occur. To get call stacks, one can add the HasCallStack constraint to any function to request it. However, did you know that doing this carelessly can cause memory usage to explode...

1
1 comments
  • Another way to put it is that HasCallStack isn't optimized away by tail call optimization. And Haskell without tail call optimization will have huge stacks.