[Haskell-cafe] Re: space leak with 'concat' ?

Simon Marlow marlowsd at gmail.com
Wed Feb 11 10:40:38 EST 2009

Jake McArthur wrote:
> Hash: SHA1
> Henning Thielemann wrote:
> | in that module I defined the text to be printed as top-level
> | variable which might have been the problem. But this can't be the
> | problem of the compiled version of the program, where I encountered the
> | leak. So I have to keep on searching that leak.
> You have created a constant applicative form (commonly abbreviated CAF).
> GHC assumes that all top level declarations are constants, and simply
> does not garbage collect them.

FUD!  CAFs are definitely garbage collected, in fact we have a big lump of 
code generator and runtime complexity (Static Reference Tables, SRTs) to 
ensure that they do.

However, GHCi doesn't always GC CAFs, perhaps that's what you meant.


More information about the Haskell-Cafe mailing list