
Hi,
Perhaps it would make sense to add something along those lines to the
documentation for Foreign.newForeignPtr as well?
-Iavor
On Mon, Apr 27, 2009 at 5:32 AM, Simon Marlow
On 27/04/2009 01:28, Sigbjorn Finne wrote:
On 4/25/2009 07:16, Ian Lynagh wrote:
On Fri, Apr 24, 2009 at 11:08:38AM +0100, Simon Marlow wrote:
We do have a WARNING pragma, incedentally:
http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#warning...
I don't think that using it for this would be a good idea, though. It would mean that people who really do want Foreign.ForeignPtr.{newForeignPtr,addForeignPtrFinalizer} would not be able to write warning-free code.
Repeating myself, I suppose :) , but I would be happy to take that "hit" for 6.10.3 if it avoids other GHC users from spending unproductive time getting on top of this change. ymmv.
As a compromise, how about expanding the runtime error message to make it clear that this is a change in 6.10.2?
finalizer: error: a C finalizer called back into Haskell. This was previously allowed, but is disallowed in GHC 6.10.2 and later. To create finalizers that may call back into Haskll, use Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr.
Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users