[Haskell-beginners] Parse error in pattern
flo.morphe at gmail.com
Fri Feb 26 11:29:34 EST 2010
I try to set up a verification on the number of arguments given to my
program, but keep on getting "Parse error in pattern"
Here is what my code looks like:
main :: IO()
main = do
-- On commence par ouvrir le fichier SAC en mode binaire
argsList <- getArgs
if (length (argsList) == 0)
putStrLn $ "No filename given to the program.\n $ ProgramName
sacFile1 <- openBinaryFile fileToOpen ReadMode
ghci complains, and tells "Parse error in pattern", indicating the 'if' line
Can you please help ?
Thank you very much,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners