CurryInfo: residuation-analysis-3.0.0 / ToolOptions.processOptions

definition: Info
 
processOptions :: String -> [String] -> IO (Options,[String])
processOptions banner argv = do
  let (funopts, args, opterrors) = getOpt Permute options argv
      opts = foldl (flip id) defaultOptions funopts
  unless (null opterrors)
         (putStr (unlines opterrors) >> printUsage >> exitWith 1)
  when (optHelp opts) (printUsage >> exitWith 0)
  return (opts, map stripCurrySuffix args)
 where
  printUsage = putStrLn (banner ++ "\n" ++ usageText)
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Process the actual command line argument and return the options
and the name of the main program.
failfree: Info
 (_, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_) |-> _}
name: Info
 processOptions
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 String -> [String] -> Prelude.IO (Options, [String])
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term