Set the long option name (e.g., "output" for --output). $$\text{long} : \text{String} \to \text{Mod}$$
Equations
- Options.Applicative.long name = { long := some name }
Instances For
Set the short option character (e.g., 'o' for -o). $$\text{short} : \text{Char} \to \text{Mod}$$
Equations
- Options.Applicative.short c = { short := some c }
Instances For
Set the help text for an option. $$\text{help} : \text{String} \to \text{Mod}$$
Equations
- Options.Applicative.help text = { help := some text }
Instances For
Set the metavar for an option (displayed in usage, e.g., FILE). $$\text{metavar} : \text{String} \to \text{Mod}$$
Equations
- Options.Applicative.metavar name = { metavar := some name }
Instances For
Mark that the default value should be shown in help. $$\text{showDefault} : \text{Mod}$$
Equations
- Options.Applicative.showDefault = { showDefault := true }
Instances For
Identity reader that returns the string as-is. $$\text{str} : \text{ReadM String}$$
Equations
Instances For
Construct a reader from an Except-returning function.
$$\text{eitherReader} : (\text{String} \to \text{Except String}\ \alpha) \to \text{ReadM}\ \alpha$$
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Automatic reader using FromString and ToString instances.
$$\text{auto} : [\text{ToString}\ \alpha] \to [\text{FromString}\ \alpha] \to \text{ReadM}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a typed option using the given reader. The option can appear anywhere in the argument list (scanned). $$\text{option} : \text{ReadM}\ \alpha \to \text{Mod} \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a string-valued option. $$\text{strOption} : \text{Mod} \to \text{Parser String}$$
Equations
Instances For
Build a boolean switch (defaults to false, active when present). $$\text{switch} : \text{Mod} \to \text{Parser Bool}$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a flag with explicit inactive/active values. $$\text{flag} : \alpha \to \alpha \to \text{Mod} \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a flag with no default (must be explicitly provided or combined with alternative). $$\text{flag'} : \alpha \to \text{Mod} \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a positional argument parser. Consumes the first non-flag argument. $$\text{argument} : \text{ReadM}\ \alpha \to \text{Mod} \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Options.Applicative.argument.findArg reader mods before [] = Except.error (toString "Missing required argument: " ++ toString (mods.metavar.getD "ARG"))
Instances For
Build a subcommand parser. The first positional argument selects the command. $$\text{subparser} : \text{List (String} \times \text{ParserInfo}\ \alpha\text{)} \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applicative pure: a parser that always succeeds with the given value, consuming no arguments. $$\text{pure} : \alpha \to \text{Parser}\ \alpha$$
Functor map for Parser.
$$\text{map} : (\alpha \to \beta) \to \text{Parser}\ \alpha \to \text{Parser}\ \beta$$
Equations
- One or more equations did not get rendered due to their size.
Applicative sequencing for Parser.
$$\text{seq} : \text{Parser}\ (\alpha \to \beta) \to (\text{Unit} \to \text{Parser}\ \alpha) \to \text{Parser}\ \beta$$
Equations
- One or more equations did not get rendered due to their size.
SeqLeft for Parser.
Equations
- One or more equations did not get rendered due to their size.
SeqRight for Parser.
Equations
- One or more equations did not get rendered due to their size.
Applicative instance for Parser.
Equations
- One or more equations did not get rendered due to their size.
Alternative: try left parser, fall back to right on failure. $$\text{orElse} : \text{Parser}\ \alpha \to (\text{Unit} \to \text{Parser}\ \alpha) \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Set a default value for a parser: if it fails, return the default. $$\text{value} : \alpha \to \text{Parser}\ \alpha \to \text{Parser}\ \alpha$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a typed option with a default value. $$\text{optionWithDefault} : \text{ReadM}\ \alpha \to \text{Mod} \to \alpha \to \text{Parser}\ \alpha$$
Equations
- Options.Applicative.optionWithDefault reader mods dflt = Options.Applicative.withDefault dflt (Options.Applicative.option reader mods)
Instances For
Build a string-valued option with a default value. $$\text{strOptionWithDefault} : \text{Mod} \to \text{String} \to \text{Parser String}$$
Equations
Instances For
Create a command entry for use with subparser.
$$\text{command} : \text{String} \to \text{ParserInfo}\ \alpha \to (\text{String} \times \text{ParserInfo}\ \alpha)$$
Equations
- Options.Applicative.command name info = (name, info)