getOpt package:cmdargs

Process the command-line, and return the list of values that matched (and those that didn't). The arguments are:
  • The order requirements (see ArgOrder)
  • The option descriptions (see OptDescr)
  • The actual command line arguments (presumably got from getArgs).
getOpt returns a triple consisting of the option arguments, a list of non-options, and a list of error messages. Changes: The list of errors will contain at most one entry, and if an error is present then the other two lists will be empty.
This provides a compatiblity wrapper to the System.Console.GetOpt module in base. That module is essentially a Haskell port of the GNU getopt library. Changes: The changes from GetOpt are listed in the documentation for each function.
Changes: This is exactly the same as getOpt, but the 3rd element of the tuple (second last) will be an empty list.