Eugene Kirpichov wrote:
The parameterless version is a top-level definition and won't get garbage-collected, IIRC.
This has not-much to do with CAFs and is really just about scope + values + liveness. live values (those which a program still refers to, e.g. from a function which might get called in the future) don't get GCed.
CAFs are just in the top-most scope and particularly likely to get held live in this fashion.
As Lennart points out, optimisations occasionally increase sharing, although GHC tries fairly hard not to do this.
Jules _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe