What do you expect to happen if the finaliser calls a foreign exported function?
Good question.
I do not expect that to work on any platform that has difficulty implementing newForeignPtr (because you could use it to implement newForeignPtr).
I don't know if it would be likely to work on GHC.
I think the spec should say that it is an error or undefined depending on whether GHC supports reentrant finalizers or not.
Yes, it will work in GHC. makeForeignPtr is easily implemented in terms of newForeignPtr, using a foreign import "dynamic".
That's a tricky one. From the standards point of view, I am actually *very* reluctant to introduce new names. On the other hand, reusing the old names will lead to a couple of unhappy emails from people using the old interface again.
But only a couple I conjecture.
Heh, I distinctly remember several complaints from *you* in the past when things have changed in GHC! Cheers, Simon
"Simon Marlow" <simonmar@microsoft.com> wrote,
That's a tricky one. From the standards point of view, I am actually *very* reluctant to introduce new names. On the other hand, reusing the old names will lead to a couple of unhappy emails from people using the old interface again.
But only a couple I conjecture.
Heh, I distinctly remember several complaints from *you* in the past when things have changed in GHC!
I don't see a contradiction in these two statements. After all Alastair can only account for one complaint per change ...and he won't complain this time; so, there will be less. ;-) Manuel
participants (2)
-
Manuel M T Chakravarty -
Simon Marlow