Merge pull request #57 from eagletmt/reversed-opts

Pass options in given order
This commit is contained in:
Kazu Yamamoto 2012-03-11 00:43:47 -08:00
commit bf7d79773a

View File

@ -62,7 +62,7 @@ argspec = [ Option "l" ["tolisp"]
parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])
parseArgs spec argv
= case getOpt Permute spec argv of
(o,n,[] ) -> (foldl (flip id) defaultOptions o, n)
(o,n,[] ) -> (foldr id defaultOptions o, n)
(_,_,errs) -> throw (CmdArg errs)
----------------------------------------------------------------