cmdargs

System.Console.CmdArgs.Explicit.Process

Synopsis

Documentation

process :: Mode a -> [String] -> Either String a

Process a list of flags (usually obtained from getArgs) with a mode. Returns Left and an error message if the command line fails to parse, or Right and the associated value.

processValue :: Mode a -> [String] -> a

Process a list of flags (usually obtained from getArgs) with a mode. Displays an error and exits with failure if the command line fails to parse, or returns the associated value. Implemeneted in terms of process.

processArgs :: Mode a -> IO a

Process the flags obtained by getArgs with a mode. Displays an error and exits with failure if the command line fails to parse, or returns the associated value. Implemented in terms of process.