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

[project @ 2002-12-10 11:11:58 by simonmar]

Use the user-supplied  stdin file for GHCi, if there is one.
parent 00d0958c
......@@ -553,7 +553,12 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
script.write('GHC.TopHandler.runIO Main.main\n')
script.close()
stdin_file = qualify(name, 'stdin')
# figure out what to use for stdin
if testopts.stdin != '':
stdin_file = testopts.stdin
else:
stdin_file = qualify(name, 'stdin')
if os.path.exists(stdin_file):
stdin = open(stdin_file, 'r')
os.system('cat ' + stdin_file + ' >>' + qscriptname)
......
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