[Haskell-cafe] Way to prevent a value from being garbage collected too early

David Feuer david.feuer at gmail.com
Wed May 13 06:52:43 UTC 2020

You're looking for the `touch` function. I don't remember where it lives. I
believe there's also a new and improved replacement whose name I don't

On Wed, May 13, 2020, 2:47 AM YueCompl via Haskell-Cafe <
haskell-cafe at haskell.org> wrote:

> Folks,
> I need a little help, I remember I had read some where that, there's a
> function to fake a use of a value, so it won't be garbage collected too
> early, as GHC has an optimization to forget a value as early as possible.
> But I can't remember the function name or even the keyword to google it
> out, hint me please!
> Best regards,
> Compl
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200513/25948c5b/attachment.html>

More information about the Haskell-Cafe mailing list