pass options in given order

This commit is contained in:
eagletmt 2012-03-11 16:40:52 +09:00
parent 41fe35b691
commit 631bbe6be8

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)
----------------------------------------------------------------