projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add tests from testsuite/tests/h98
[ghc-base.git]
/
GHC
/
ConsoleHandler.hs
diff --git
a/GHC/ConsoleHandler.hs
b/GHC/ConsoleHandler.hs
index
ed6eb2b
..
562ef32
100644
(file)
--- a/
GHC/ConsoleHandler.hs
+++ b/
GHC/ConsoleHandler.hs
@@
-1,4
+1,5
@@
-{-# OPTIONS_GHC -cpp #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
@@
-42,8
+43,6
@@
import Data.Typeable
#ifdef mingw32_HOST_OS
import Data.Maybe
import GHC.Base
#ifdef mingw32_HOST_OS
import Data.Maybe
import GHC.Base
-import GHC.Num
-import GHC.Real
#endif
data Handler
#endif
data Handler
@@
-148,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