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

Henning Thielemann lemming at henning-thielemann.de
Wed May 13 09:00:08 UTC 2020


On Wed, 13 May 2020, Sylvain Henry wrote:

> It's quite fragile (e.g. can be optimized away or moved), so we're trying to replace it with something else. See
> https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/with-combinator

I remember that the fragility due to optimization is quite a problem. I 
found that creating a StablePtr is reliable, however.


More information about the Haskell-Cafe mailing list