调用文件的Haskell有输入

时间:2016-10-27 21:57:33

标签: haskell

想象一下,我编译了program.hs文件,其中:

main :: IO ()
main = do a <- getArgs 
          w <- getContents
...

我的问题是如何在Windows命令行中运行该程序,以便从file.txt接收输入?

1 个答案:

答案 0 :(得分:2)

运行程序时使用var player: SKSpriteNode! override func didMove(to view: SKView) { guard let player = childNode(withName: "player") as? SKSpriteNode else {         fatalError("player node not loaded")     }     self.player = player } 输入重定向运算符:

<