[Haskell-cafe] Re: Top Level <-

Ashley Yakeley ashley at semantic.org
Sun Sep 7 18:11:04 EDT 2008

Ganesh Sittampalam wrote:
> Suppose I am writing something that I intend to be used as part of a 
> plug-in that is reloaded in different forms again and again. And I see 
> module K which does something I want, so I use it. It so happens that K 
> uses M, which has a <-. If I knew that using K in my plug-in would cause 
> a memory leak, I would avoid doing so; but since the whole point of <- 
> is to avoid making the need for some state visible in the API.

The results from the <- in M will only be stored once for the life of 
the RTS, no matter how many times your plug-ins are reloaded.

Ashley Yakeley

More information about the Haskell-Cafe mailing list