diff options
author | Ian Lynagh <igloo@earth.li> | 2010-12-15 21:37:15 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-12-15 21:37:15 +0000 |
commit | 9d1a7251a138829f59cc1cf052ee2d3f5603d67b (patch) | |
tree | d019cdddd8948cb772b96e611f92ab9c19b80037 /ghc/InteractiveUI.hs | |
parent | be36dc8301313715f1373a323c9c322f57295e74 (diff) | |
download | haskell-9d1a7251a138829f59cc1cf052ee2d3f5603d67b.tar.gz |
Remove more dead code now we require GHC >= 6.12
Diffstat (limited to 'ghc/InteractiveUI.hs')
-rw-r--r-- | ghc/InteractiveUI.hs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index e22eaef83c..a2ba64ef07 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -89,12 +89,8 @@ import Text.Printf import Foreign import GHC.Exts ( unsafeCoerce# ) -#if __GLASGOW_HASKELL__ >= 611 import GHC.IO.Exception ( IOErrorType(InvalidArgument) ) import GHC.IO.Handle ( hFlushAll ) -#else -import GHC.IOBase ( IOErrorType(InvalidArgument) ) -#endif import GHC.TopHandler @@ -338,7 +334,7 @@ interactiveUI srcs maybe_exprs = do -- We don't want the cmd line to buffer any input that might be -- intended for the program, so unbuffer stdin. hSetBuffering stdin NoBuffering -#if defined(mingw32_HOST_OS) && __GLASGOW_HASKELL__ >= 611 +#if defined(mingw32_HOST_OS) -- On Unix, stdin will use the locale encoding. The IO library -- doesn't do this on Windows (yet), so for now we use UTF-8, -- for consistency with GHC 6.10 and to make the tests work. @@ -658,15 +654,12 @@ runStmt stmt step | "import " `isPrefixOf` stmt = do newContextCmd (Import stmt); return False | otherwise - = do -#if __GLASGOW_HASKELL__ >= 611 - -- In the new IO library, read handles buffer data even if the Handle + = do -- In the new IO library, read handles buffer data even if the Handle -- is set to NoBuffering. This causes problems for GHCi where there -- are really two stdin Handles. So we flush any bufferred data in -- GHCi's stdin Handle here (only relevant if stdin is attached to -- a file, otherwise the read buffer can't be flushed). _ <- liftIO $ IO.try $ hFlushAll stdin -#endif result <- GhciMonad.runStmt stmt step afterRunStmt (const True) result |