[commit: ghc] master: Fix windows breakage from 5ed12810e0972b1e due to import cycles (27b937e)

git at git.haskell.org git at git.haskell.org
Mon Sep 22 08:44:05 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/27b937e5012c902a513dbc3b6ae24bf490ce656e/ghc

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

commit 27b937e5012c902a513dbc3b6ae24bf490ce656e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Sep 22 10:42:09 2014 +0200

    Fix windows breakage from 5ed12810e0972b1e due to import cycles
    
    Refs #9586


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

27b937e5012c902a513dbc3b6ae24bf490ce656e
 libraries/base/GHC/Conc/Windows.hs             | 5 ++---
 libraries/base/GHC/IO/Encoding/CodePage.hs     | 2 +-
 libraries/base/GHC/IO/Encoding/CodePage/API.hs | 3 +--
 libraries/base/GHC/Windows.hs                  | 2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/libraries/base/GHC/Conc/Windows.hs b/libraries/base/GHC/Conc/Windows.hs
index aef7fbf..a957182 100644
--- a/libraries/base/GHC/Conc/Windows.hs
+++ b/libraries/base/GHC/Conc/Windows.hs
@@ -38,7 +38,6 @@ module GHC.Conc.Windows
        , toWin32ConsoleEvent
        ) where
 
-import Control.Monad (unless)
 import Data.Bits (shiftR)
 import Data.Typeable
 import GHC.Base
@@ -225,7 +224,7 @@ prodServiceThread = do
   -- conditions in which prodding is left at True but the server is
   -- blocked in select().
   was_set <- atomicModifyIORef prodding $ \b -> (True,b)
-  unless was_set wakeupIOManager
+  when (not was_set) wakeupIOManager
 
 -- ----------------------------------------------------------------------------
 -- Windows IO manager thread
@@ -258,7 +257,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
-        unless exit $ service_cont wakeup delays'
+        when (not exit) $ service_cont wakeup delays'
 
     _other -> service_cont wakeup delays' -- probably timeout
 
diff --git a/libraries/base/GHC/IO/Encoding/CodePage.hs b/libraries/base/GHC/IO/Encoding/CodePage.hs
index 6a8ee1a..aea4314 100644
--- a/libraries/base/GHC/IO/Encoding/CodePage.hs
+++ b/libraries/base/GHC/IO/Encoding/CodePage.hs
@@ -23,7 +23,7 @@ import GHC.IO.Encoding.Types
 import GHC.IO.Buffer
 import Data.Bits
 import Data.Maybe
-import Data.List (lookup)
+import Data.OldList (lookup)
 
 import qualified GHC.IO.Encoding.CodePage.API as API
 import GHC.IO.Encoding.CodePage.Table
diff --git a/libraries/base/GHC/IO/Encoding/CodePage/API.hs b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
index 570ea80..8b6472b 100644
--- a/libraries/base/GHC/IO/Encoding/CodePage/API.hs
+++ b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
@@ -8,7 +8,6 @@ import Foreign.C
 import Foreign.Ptr
 import Foreign.Marshal
 import Foreign.Storable
-import Control.Monad
 import Data.Bits
 import Data.Either
 import Data.Word
@@ -136,7 +135,7 @@ newCP rec fn cp = do
   -- Fail early if the code page doesn't exist, to match the behaviour of the IConv TextEncoding
   max_char_size <- alloca $ \cpinfo_ptr -> do
     success <- c_GetCPInfo cp cpinfo_ptr 
-    unless success $ throwGetLastError ("GetCPInfo " ++ show cp)
+    when (not success) $ throwGetLastError ("GetCPInfo " ++ show cp)
     fmap (fromIntegral . maxCharSize) $ peek cpinfo_ptr
 
   debugIO $ "GetCPInfo " ++ show cp ++ " = " ++ show max_char_size
diff --git a/libraries/base/GHC/Windows.hs b/libraries/base/GHC/Windows.hs
index 940ba58..71ebcf7 100644
--- a/libraries/base/GHC/Windows.hs
+++ b/libraries/base/GHC/Windows.hs
@@ -58,7 +58,7 @@ module GHC.Windows (
     ) where
 
 import Data.Char
-import Data.List
+import Data.OldList
 import Data.Maybe
 import Data.Word
 import Foreign.C.Error



More information about the ghc-commits mailing list