[project @ 2001-04-26 11:38:53 by qrczak]
authorqrczak <unknown>
Thu, 26 Apr 2001 11:38:53 +0000 (11:38 +0000)
committerqrczak <unknown>
Thu, 26 Apr 2001 11:38:53 +0000 (11:38 +0000)
Don't write to stdin when there is no Readline.

ghc/compiler/ghci/InteractiveUI.hs

index e74fc87..be216e6 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.63 2001/04/26 11:08:32 sewardj Exp $
+-- $Id: InteractiveUI.hs,v 1.64 2001/04/26 11:38:53 qrczak Exp $
 --
 -- GHC Interactive User Interface
 --
@@ -181,7 +181,7 @@ fileLoop :: Handle -> Bool -> GHCi ()
 fileLoop hdl prompt = do
    st <- getGHCiState
    mod <- io (cmGetContext (cmstate st))
-   when prompt (io (hPutStr hdl (mod ++ "> ")))
+   when prompt (io (putStr (mod ++ "> ")))
    l <- io (IO.try (hGetLine hdl))
    case l of
        Left e | isEOFError e -> return ()