[Haskell-cafe] Re: Top Level <-

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Sep 6 11:05:47 EDT 2008

On 2008 Sep 6, at 6:10, Ashley Yakeley wrote:
> Ganesh Sittampalam wrote:
>> I would call it a leak if something that is no longer being used  
>> cannot be reclaimed. The endless stream of different modules is  
>> possible in long-running systems where the code being run evolves  
>> or changes over time (e.g. something like lambdabot, which runs  
>> user-provided code).
> This might be fixable with an option to the dynamic load function.
> Let us say a module M has a number of top-level <- of the form
>  val <- exp
> The set of ACIO expressions exp is the "static initialisers" of M.  
> The RTS must note when each static initialiser is run, and cache its  
> result val. Let's call this cache of vals the "static results cache"  
> of M.
> When M is loaded, and a static results cache for M already exists,  
> then it will be used for the vals of M.

This sounds "reachable" to me, and therefore static overhead and not a  
Your proposed "freeable" flag is still useful, but I think this is not  
a problem.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list