Skip to content

Commit

Permalink
Make option parser treat additional args as files
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiltyDolphin committed Nov 21, 2015
1 parent 781cecc commit c5ec51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions angle-commandline/Angle/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ usage = "Usage: angle [OPTION...] files..."
getOptions :: IO Options
getOptions = do
args <- getArgs
(opts, _) <-
(opts, nonOpts) <-
case getOpt RequireOrder options args of
(opt,nonOpt,[]) -> return (opt,nonOpt)
(_,_,errs) -> ioError
(userError (concat errs ++ usageInfo usage options))
foldl' (>>=) (return defaultOptions) opts
foldl' (>>=) (return defaultOptions { optFiles = nonOpts }) opts

0 comments on commit c5ec51d

Please sign in to comment.