X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FConsoleHandler.hs;h=562ef32a675dea35d856c63fa483a825bc24addb;hb=e95046ebf2e4833b56c6ddaf5b3108390cee08a5;hp=abc2458c1fef672172d05f8130654059feffeb54;hpb=83e087f3e465913e321ac0edd362238410d81082;p=ghc-base.git diff --git a/GHC/ConsoleHandler.hs b/GHC/ConsoleHandler.hs index abc2458..562ef32 100644 --- a/GHC/ConsoleHandler.hs +++ b/GHC/ConsoleHandler.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -cpp #-} +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.ConsoleHandler @@ -42,7 +43,6 @@ import Data.Typeable #ifdef mingw32_HOST_OS import Data.Maybe import GHC.Base -import GHC.Real #endif data Handler @@ -147,7 +147,7 @@ flushConsole h = "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