Commit 27b937e5 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Fix windows breakage from 5ed12810 due to import cycles

Refs #9586
parent b8f58392
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment