Bindings and Space leaks
Janis Voigtlaender <firstname.lastname@example.org>
Wed, 4 Jul 2001 14:49:58 +0200 (MET DST)
I've got two questions regarding bindings in Haskell:
1. Is there something like a strict "let!" for avoiding function closures by
forcing strict evaluation (to headnormalform) of local declarations?
2. In a '93 paper, Jan Sparud describes an implementation technique for avoiding
space leaks when tuples are returned as function result, and the values accessed
by pattern matching in bindings. The paper says this technique (of
shorcircuiting all references via a tuple, the first time a tuple element is
demanded) has been implemented in Chalmers LML/HBC compiler. What about other
compilers, e.g. GHC?
Any hint would be helpful.