Minor code tidyups in GHC.Conc
authorIan Lynagh <igloo@earth.li>
Fri, 10 Jul 2009 00:38:01 +0000 (00:38 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 10 Jul 2009 00:38:01 +0000 (00:38 +0000)
GHC/Conc.lhs

index 21034cb..67a2199 100644 (file)
@@ -848,9 +848,7 @@ service_loop wakeup old_delays = do
                 _ | r2 == io_MANAGER_DIE    -> return True
                 0 -> return False -- spurious wakeup
                 _ -> do start_console_handler (r2 `shiftR` 1); return False
-        if exit
-          then return ()
-          else service_cont wakeup delays'
+        unless exit $ service_cont wakeup delays'
 
     _other -> service_cont wakeup delays' -- probably timeout        
 
@@ -1049,7 +1047,7 @@ service_loop wakeup readfds writefds ptimeval old_reqs old_delays = do
                        runHandlers' fp (fromIntegral s)
                        return False
 
-  if exit then return () else do
+  unless exit $ do
 
   atomicModifyIORef prodding (\_ -> (False, ()))