Commit 1dc7cb3e authored by simonmar's avatar simonmar
Browse files

[project @ 2002-12-02 15:26:13 by simonmar]

Add support for stdin files in the GHCi way.
parent b79c336a
......@@ -551,7 +551,13 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
# 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')
script.write(':q\n')
script.close()
stdin_file = qualify(name, 'stdin')
if os.path.exists(stdin_file):
stdin = open(stdin_file, 'r')
os.system('cat ' + stdin_file + ' >>' + qscriptname)
script.close()
cmd = 'cd ' + testdir + " && '" \
......
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