ANNOUNCE: GHC 6.10.2 Release Candidate 1
simonpj at microsoft.com
Wed Mar 25 04:54:18 EDT 2009
[Narrowing to cvs-ghc]
So Axel says "we are doomed" and Manuel says "it's easy".
I don't want GHC 6.10.2 to "fundamentally break" GtkHs.
Let's resolve this.
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Manuel M T Chakravarty
| Sent: 25 March 2009 01:17
| To: jutaro
| Cc: glasgow-haskell-users at haskell.org
| Subject: Re: ANNOUNCE: GHC 6.10.2 Release Candidate 1
| > This is the first answer I got from the gtk2hs mailing list. Please
| > consider
| > this issue seriously.
| Well there is a simple fix as Simon Marlow wrote,
| > The fix is fiarly easy: use Foreign.Concurrent.mkForeignPtr with a
| > foreign import.
| In fact, if as Axel writes, these finalisers are Haskell functions
| that are exported using foreign import wrapper, then using
| Foreign.Concurrent.mkForeignPtr is actually the *simpler* thing to do
| (you don't need any wrapping and exporting).
| > Axel Simon wrote:
| >> Phew,
| >> I think we're doomed. We have many, many little methods that take a
| >> user-given function, wrap it into a foreign export wrapper which is
| >> freed by using an on-destroy callback to Haskell. These functions are
| >> most likely installed into some widgets (or other reference-counted
| >> objects) that will be eventually destroyed by the Haskell garbage
| >> collector. So, basically, we can't easily change Gtk2Hs. It will
| >> involve many modifications. I can understand that not allowing
| >> callbacks during GC is a great simplification in the runtime but it
| >> seemed to be common practice to free Stable and function pointers
| >> from within Haskell using a callback.
| >> So, unless I'm wrong on why finalizers call back into Haskell land,
| >> then this means that Gtk2Hs is fundamentally broken for the
| >> foreseeable future.
| >> Axel.
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
More information about the Cvs-ghc