#7250: Documentation of System.Mem.Weak should emphasize finalizers may be run earlier than expected ------------------------------+--------------------------------------------- Reporter: edsko | Owner: Type: bug | Status: new Priority: normal | Component: Documentation Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- The problem is mentioned in addFinalizer, but not in mkWeak; moreover, the documentation of addFinalizer reads as if this is a problem specific to foreign pointers, which is not (and, unrelated, ForeignPtr# does not exist anymore).
It would be useful if the problem were highlighted in mkWeak, as it may introduce hard to find bugs in user code in cases where finalizers that are run too early cause problems. The behaviour of mkWeak is highly non- obvious. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7250> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs