Can anyone please help me to trouble shoot this error
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"
I get a
doesFileExistsException.hs:12:22: error:
parse error on input `putStrLn'
error message. I made sure that there are no tabs in the file. Please let me know what is causing this error.
THanks