
This is the first answer I got from the gtk2hs mailing list. Please consider this issue seriously. Jürgen 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.
-- View this message in context: http://www.nabble.com/ANNOUNCE%3A-GHC-6.10.2-Release-Candidate-1-tp22524567p... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.