pass options in given order
This commit is contained in:
parent
41fe35b691
commit
631bbe6be8
@ -62,7 +62,7 @@ argspec = [ Option "l" ["tolisp"]
|
|||||||
parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])
|
parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])
|
||||||
parseArgs spec argv
|
parseArgs spec argv
|
||||||
= case getOpt Permute spec argv of
|
= 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)
|
(_,_,errs) -> throw (CmdArg errs)
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user