projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add NoImplicitPrelude (fix Windows build failure)
[ghc-base.git]
/
GHC
/
ConsoleHandler.hs
diff --git
a/GHC/ConsoleHandler.hs
b/GHC/ConsoleHandler.hs
index
af115b8
..
223a2bb
100644
(file)
--- a/
GHC/ConsoleHandler.hs
+++ b/
GHC/ConsoleHandler.hs
@@
-1,4
+1,5
@@
-{-# OPTIONS_GHC -cpp #-}
+{-# LANGUAGE CPP #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
@@
-18,7
+19,6
@@
module GHC.ConsoleHandler
#if !defined(mingw32_HOST_OS) && !defined(__HADDOCK__)
where
module GHC.ConsoleHandler
#if !defined(mingw32_HOST_OS) && !defined(__HADDOCK__)
where
-import Prelude -- necessary to get dependencies right
#else /* whole file */
( Handler(..)
, installHandler
#else /* whole file */
( Handler(..)
, installHandler
@@
-27,11
+27,9
@@
import Prelude -- necessary to get dependencies right
) where
{-
) where
{-
-#include "Signals.h"
+#include "rts/Signals.h"
-}
-}
-import Prelude -- necessary to get dependencies right
-
import Foreign
import Foreign.C
import GHC.IO.FD
import Foreign
import Foreign.C
import GHC.IO.FD
@@
-42,6
+40,11
@@
import GHC.Conc
import Control.Concurrent.MVar
import Data.Typeable
import Control.Concurrent.MVar
import Data.Typeable
+#ifdef mingw32_HOST_OS
+import Data.Maybe
+import GHC.Base
+#endif
+
data Handler
= Default
| Ignore
data Handler
= Default
| Ignore
@@
-144,7
+147,7
@@
flushConsole h =
"handle is not a file descriptor" Nothing Nothing
Just fd -> do
throwErrnoIfMinus1Retry_ "flushConsole" $
"handle is not a file descriptor" Nothing Nothing
Just fd -> do
throwErrnoIfMinus1Retry_ "flushConsole" $
- flush_console_fd (fromIntegral (fdFD fd))
+ flush_console_fd (fdFD fd)
foreign import ccall unsafe "consUtils.h flush_input_console__"
flush_console_fd :: CInt -> IO CInt
foreign import ccall unsafe "consUtils.h flush_input_console__"
flush_console_fd :: CInt -> IO CInt