[commit: base] master: Fix warnings (bfe01f0)

Ian Lynagh igloo at earth.li
Sun Apr 21 21:53:15 CEST 2013


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

On branch  : master

https://github.com/ghc/packages-base/commit/bfe01f0e09bfdf38b7f8a1802d0bb2217aabd4fa

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

commit bfe01f0e09bfdf38b7f8a1802d0bb2217aabd4fa
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Apr 21 18:56:38 2013 +0100

    Fix warnings

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

 System/Timeout.hs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/System/Timeout.hs b/System/Timeout.hs
index 869b85c..f17f4f9 100644
--- a/System/Timeout.hs
+++ b/System/Timeout.hs
@@ -26,7 +26,6 @@ module System.Timeout ( timeout ) where
 
 #ifdef __GLASGOW_HASKELL__
 import Control.Concurrent
-import Control.Concurrent.MVar
 import GHC.Event           (getSystemTimerManager,
                             registerTimeout, unregisterTimeout)
 import Control.Exception   (Exception(..), handleJust, bracket,
@@ -106,8 +105,8 @@ timeout n f
         let handleTimeout = do
                 v <- isEmptyMVar lock
                 when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do
-                    v <- tryPutMVar lock =<< myThreadId
-                    when v $ throwTo pid ex
+                    v2 <- tryPutMVar lock =<< myThreadId
+                    when v2 $ throwTo pid ex
             cleanupTimeout key = uninterruptibleMask_ $ do
                 v <- tryPutMVar lock undefined
                 if v then unregisterTimeout tm key





More information about the ghc-commits mailing list