[Haskell-cafe] Strange memory consumption problems in something that should be tail-recursive

Kirsten Chevalier catamorphism at gmail.com
Tue Feb 13 17:03:43 EST 2007

On 2/13/07, Jefferson Heard <jeff at renci.org> wrote:
> Thanks for the redirect.  I haven't tried profiling yet, as I was hoping it
> was obvious to the more seasoned user.  In reference to your comment about
> tail-recursion not working as you'd always expect, is there some document
> somewhere that tells the wherefores of that?  I'm using fully qualified types
> and fully uncurried functions, so I wouldn't think that I should really see
> this kind of recursion, coming from languages like Scheme and OCaml.

Seasoned users know that nothing is obvious until you run the
profiler. With that said, the discussion on haskell-cafe is good when
it comes to the reasoning behind tail-recursion not working the way
users of strict languages might expect. Perhaps it should be written
up somewhere more permanent. But that's a point about Haskell in


Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"Everyone's too stupid." -- _Ghost World_

More information about the Glasgow-haskell-users mailing list