summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-12-15 21:37:15 +0000
committerIan Lynagh <igloo@earth.li>2010-12-15 21:37:15 +0000
commit9d1a7251a138829f59cc1cf052ee2d3f5603d67b (patch)
treed019cdddd8948cb772b96e611f92ab9c19b80037 /ghc
parentbe36dc8301313715f1373a323c9c322f57295e74 (diff)
downloadhaskell-9d1a7251a138829f59cc1cf052ee2d3f5603d67b.tar.gz
Remove more dead code now we require GHC >= 6.12
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs11
-rw-r--r--ghc/hschooks.c3
2 files changed, 2 insertions, 12 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
diff --git a/ghc/hschooks.c b/ghc/hschooks.c
index f3c4b4d1a7..4878021a8b 100644
--- a/ghc/hschooks.c
+++ b/ghc/hschooks.c
@@ -5,9 +5,6 @@ in instead of the defaults.
*/
#include "Rts.h"
-#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ <611)
-#include "RtsFlags.h"
-#endif
#include "HsFFI.h"