Describes whether an option takes an argument or not, and if so
how the argument is injected into a value of type a.
Modulererebase-1.21.2Haskell2010
System.Console.GetOpt
- 3 types
- 3 values
- Packagererebase-1.21.2
- Exports6
- LanguageHaskell2010
- LicenceMIT
- SourceGetOpt.hs
What to do with options following non-options
Constructors
RequireOrderno option processing after first non-option
Permutefreely intersperse options and non-options
ReturnInOrder (String -> a)wrap non-options into options
Instances2Functor, Invariant
Instances2Functor, Invariant
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.
This is almost the same as getOpt, but returns a quadruple consisting of the option arguments, a list of non-options, a list of unrecognized options, and a list of error messages.
Return a string describing the usage of a command, derived from the header (first argument) and the options described by the second argument.