任何人都可以帮我解决这个错误吗
import System.Environment
import System.IO
import System.Directory
main = do
(fileName:_) <- getArgs
fileExists <- doesFileExists fileName
if fileExists
then do contents <- readFile fileName
putStrLn $ "The file has " ++ show (length (lines contents)) ++ " lines."
else do putStrLn "File does not exist"
我得到了
doesFileExistsException.hs:12:22: error:
parse error on input `putStrLn'
错误消息。我确保文件中没有标签。请告诉我导致此错误的原因。
感谢