Re: [Haskell-cafe] Equivalent of withForeignPtr for System.Mem.Weak?

2010-10-31 Thread Antoine Latter
On Sun, Oct 31, 2010 at 10:14 PM, Matthew Steele wrote: > I have an object to which I have added one or more finalizers via > addFinalizer from System.Mem.Weak.  I would like to have a function that > allows me to make use of the object within a block of IO code, and guarantee > that the finalizer

[Haskell-cafe] Equivalent of withForeignPtr for System.Mem.Weak?

2010-10-31 Thread Matthew Steele
I have an object to which I have added one or more finalizers via addFinalizer from System.Mem.Weak. I would like to have a function that allows me to make use of the object within a block of IO code, and guarantee that the finalizer(s) will not be called during the code block -- sort of l