Haskell's problem with exploding call stacks

https://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...

6 points · 1 comments · view on lemmy.world

1 Comments

jaror@kbin.social · 2 pts · 2y

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.