Commit a7549035 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-01-28 13:34:10 by simonmar]

Set stdin to unbuffered, so that GHCi doesn't accidentally buffer any
input that might be intended for the program.
parent 4db852d2
{-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-}
-----------------------------------------------------------------------------
-- $Id: InteractiveUI.hs,v 1.111 2002/01/28 12:01:12 simonmar Exp $
-- $Id: InteractiveUI.hs,v 1.112 2002/01/28 13:34:10 simonmar Exp $
--
-- GHC Interactive User Interface
--
......@@ -173,6 +173,10 @@ interactiveUI cmstate paths cmdline_libs = do
Just hval -> writeIORef flush_stdout (unsafeCoerce# hval :: IO ())
_ -> panic "interactiveUI:stdout"
-- We don't want the cmd line to buffer any input that might be
-- intended for the program, so unbuffer stdin.
hSetBuffering stdin NoBuffering
-- initial context is just the Prelude
cmstate <- cmSetContext cmstate dflags [] ["Prelude"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment