|
|
1
6
如果你重做你的
*Main> System.Environment.withArgs ["main.txt"] main 在GHCI内,不要在stdin上给出EOF。如果这样做,所有进一步的读取stdin的尝试都将失败: Prelude> getLine *** Exception: <stdin>: hGetLine: illegal operation (handle is closed) Prelude> getContents *** Exception: <stdin>: hGetContents: illegal operation (handle is closed) |
|
|
2
4
您可以在ghci中键入:main来调用命令行参数。恐怕你只是想用一下。 |