Commit cd73b722 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-12-02 14:40:38 by simonmar]

GHCi way: set the buffering on stdout to LineBuffering to more
correctly match the compiled environment.
parent c9ac5c1f
......@@ -539,6 +539,8 @@ def interpreter_run( name, way, extra_hc_opts, compile_only ):
# can separate GHCi's output from the program's.
script.write(':! echo ' + delimiter)
script.write(':! echo 1>&2 ' + delimiter)
# Set stdout to be line-buffered to match the compiled environment.
script.write('System.IO.hSetBuffering System.IO.stdout System.IO.LineBuffering\n')
# wrapping in GHC.TopHandler.runIO ensures we get the same output
# in the event of an exception as for the compiled program.
script.write('GHC.TopHandler.runIO Main.main\n')
......
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