나는 다음과 같은 오류를 받고 있어요 ...하스켈 구문 분석 오류는 내부`입력에
구문 분석 오류를 차단 할 인수 '
...
다음 코드를 컴파일하는 동안 :import System.Environment (getArgs)
interactWith function inputFile outputFile = do
input <- readFile inputFile
writeFile outputFile (function input)
main = mainWith myFunction
where mainWith function = do
args <- getArgs
case args of
[input,output] -> interactWith function input output
_ -> putStrLn "error: exactly two arguments needed"
-- replace "id" with the name of our function below
myFunction = id
코드는 의 Real World Haskell의 4 장에서 가져온 것입니다.