Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d8598125d5daa1dccd78bf5210494455b4bc3089

>---------------------------------------------------------------

commit d8598125d5daa1dccd78bf5210494455b4bc3089
Author: Simon Marlow <[email protected]>
Date:   Fri Apr 27 11:12:06 2012 +0100

    use mkWeakNoFinalizer# (#5879)

>---------------------------------------------------------------

 GHC/Conc/Sync.lhs |    2 +-
 GHC/Weak.lhs      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs
index af2521d..197ca8c 100644
--- a/GHC/Conc/Sync.lhs
+++ b/GHC/Conc/Sync.lhs
@@ -531,7 +531,7 @@ threadCapability (ThreadId t) = IO $ \s ->
 --
 mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)
 mkWeakThreadId t@(ThreadId t#) = IO $ \s ->
-   case mkWeak# t# t (unsafeCoerce# 0#) s of 
+   case mkWeakNoFinalizer# t# t s of
       (# s1, w #) -> (# s1, Weak w #)
 \end{code}
 
diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs
index a3e2115..93c4eac 100644
--- a/GHC/Weak.lhs
+++ b/GHC/Weak.lhs
@@ -94,7 +94,7 @@ mkWeak  :: k                            -- ^ key
 mkWeak key val (Just finalizer) = IO $ \s ->
    case mkWeak# key val finalizer s of { (# s1, w #) -> (# s1, Weak w #) }
 mkWeak key val Nothing = IO $ \s ->
-   case mkWeak# key val (unsafeCoerce# 0#) s of { (# s1, w #) -> (# s1, Weak w 
#) }
+   case mkWeakNoFinalizer# key val s of { (# s1, w #) -> (# s1, Weak w #) }
 
 {-|
 Dereferences a weak pointer.  If the key is still alive, then



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to