parseOptions :: [String] -> IO (Options, [String])
parseOptions argv =
   case getOpt Permute optionsDescr argv of
      (o,n,[]  ) -> return (foldl' (flip ($)) defaultOpts o,n)
      (_,_,errs) -> usageFailure (concat errs)
  where
    defaultOpts =
        Options { optVerbose = False, optHelp = False,
                  optRemove = OptDryRun }
parseOptions :: [String] -> IO (Options, [String])
parseOptions argv =
   case getOpt Permute optionsDescr argv of
      (o,n,[]  ) -> return (foldl' (flip ($)) defaultOpts o,n)
      (_,_,errs) -> usageFailure (concat errs)
  where
    defaultOpts =
        Options { optVerbose = False, optHelp = False,
                  optRemove = OptDryRun }
parseOptions argv =
   case getOpt Permute optionsDescr argv of
      (o,n,[]  ) -> return (foldl' (flip ($)) defaultOpts o,n)
      (_,_,errs) -> usageFailure (concat errs)
  where
    defaultOpts =
        Options { optVerbose = False, optHelp = False,
                  optRemove = OptDryRun }