From: sof Date: Fri, 26 Jul 2002 03:06:58 +0000 (+0000) Subject: [project @ 2002-07-26 03:06:58 by sof] X-Git-Tag: Approx_11550_changesets_converted~1802 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6b269a43038d1cb4b6f7dc4f2a9d8f47578ff811;p=ghc-hetmet.git [project @ 2002-07-26 03:06:58 by sof] interactiveLoop{mingw32}: always show prompt under mingw. hIsTerminalDevice returns True iff stdin is connected to a Console under Win32. Which it is when running in a command shell (DOS,bash etc.), but Emacs sub-shells don't get a Console of their own when invoked. So, just disable this feature (whose motivation somewhat escapes me.) --- diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 8cd26ab..de95de8 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,6 +1,6 @@ {-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.129 2002/07/17 13:49:15 simonmar Exp $ +-- $Id: InteractiveUI.hs,v 1.130 2002/07/26 03:06:58 sof Exp $ -- -- GHC Interactive User Interface -- @@ -243,8 +243,14 @@ runGHCi paths dflags = do loadModule (unwords paths) -- enter the interactive loop +#if defined(mingw32_TARGET_OS) + -- always show prompt, since hIsTerminalDevice returns True for Consoles + -- only, which we may or may not be running under (cf. Emacs sub-shells.) + interactiveLoop True +#else is_tty <- io (hIsTerminalDevice stdin) interactiveLoop is_tty +#endif -- and finally, exit io $ do when (verbosity dflags > 0) $ putStrLn "Leaving GHCi."