From: qrczak Date: Thu, 26 Apr 2001 11:38:53 +0000 (+0000) Subject: [project @ 2001-04-26 11:38:53 by qrczak] X-Git-Tag: Approximately_9120_patches~2100 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55411b4b8faa19db3c746d07e13d41fb931ab646;p=ghc-hetmet.git [project @ 2001-04-26 11:38:53 by qrczak] Don't write to stdin when there is no Readline. --- diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index e74fc87..be216e6 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -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 ()