Fix command line parsing

This commit is contained in:
Daniel Gröber 2015-05-13 11:02:24 +02:00
parent e6fc3dd8d2
commit 133ec67350

View File

@ -270,7 +270,7 @@ globalArgSpec =
parseGlobalArgs :: [String] -> Either InvalidCommandLine (Options, [String]) parseGlobalArgs :: [String] -> Either InvalidCommandLine (Options, [String])
parseGlobalArgs argv parseGlobalArgs argv
= case O.getOpt' Permute globalArgSpec argv of = case O.getOpt' RequireOrder globalArgSpec argv of
(o,r,u,[]) -> Right $ (foldr id defaultOptions o, u ++ r) (o,r,u,[]) -> Right $ (foldr id defaultOptions o, u ++ r)
(_,_,u,e) -> Left $ InvalidCommandLine $ Right $ (_,_,u,e) -> Left $ InvalidCommandLine $ Right $
"Parsing command line options failed: " "Parsing command line options failed: "