Instances2Semigroup, Monoid
Semigroup ParseErrorDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesMonoid ParseErrorDefined in optparse-applicative-0.18.1.0 · Options.Applicative.Types
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Moduleoptparse-applicative-0.18.1.0Haskell98
Semigroup ParseErrorDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesMonoid ParseErrorDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesA full description for a runnable Parser for a program.
ParserInfoinfoParser :: Parser athe option parser for the program
infoFullDesc :: Boolwhether the help text should contain full documentation
infoProgDesc :: Chunk Docbrief parser description
infoHeader :: Chunk Docheader of the full parser description
infoFailureCode :: Intexit code for a parser failure
infoPolicy :: ArgPolicyallow regular options and flags to occur after arguments (default: InterspersePolicy)
Functor ParserInfoDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesGlobal preferences for a top-level Parser.
ParserPrefsprefMultiSuffix :: Stringmetavar suffix for multiple options
prefDisambiguate :: Boolautomatically disambiguate abbreviations (default: False)
prefShowHelpOnError :: Boolalways show help text on parse errors (default: False)
prefShowHelpOnEmpty :: Boolshow the help text for a command or subcommand if it fails with no input (default: False)
prefBacktrack :: Backtrackingbacktrack to parent parser when a subcommand fails (default: Backtrack)
prefColumns :: Intnumber of columns in the terminal, used to format the help page (default: 80)
prefHelpLongEquals :: Boolwhen displaying long names in usage and help,
use an = sign for long names, rather than a
single space (default: False)
prefHelpShowGlobal :: Boolwhen displaying subparsers' usage help, show parent options under a "global options" section (default: False)
prefTabulateFill :: IntIndentation width for tables
Eq ParserPrefsDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow ParserPrefsDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesA single option of a parser.
OptionoptMain :: OptReader areader for this option
optProps :: OptPropertiesproperties of this option
An OptReader defines whether an option matches an command line argument.
OptReader [OptName] (CReader a) (String -> ParseError)option reader
FlagReader [OptName] !aflag reader
ArgReader (CReader a)argument reader
CmdReader (Maybe String) [(String, ParserInfo a)]command reader
Specification for an individual parser option.
OptPropertiespropVisibility :: OptVisibilitywhether this flag is shown in the brief description
propHelp :: Chunk Dochelp text for this option
propMetaVar :: Stringmetavariable for this option
propShowDefault :: Maybe Stringwhat to show in the help text as the default
propShowGlobal :: Boolwhether the option is presented in global options text
propDescMod :: Maybe (Doc -> Doc)a function to run over the brief description
Show OptPropertiesDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesVisibility of an option in the help text.
Eq OptVisibilityDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesOrd OptVisibilityDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow OptVisibilityDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesEq BacktrackingDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow BacktrackingDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesA newtype over 'ReaderT String Except', used by option readers.
Monad ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesFunctor ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesMonadFail ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesApplicative ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesAlternative ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesMonadPlus ReadMDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesReturn the value being read.
Abort option reader by exiting with a ParseError.
Abort option reader by exiting with an error message.
CReadercrCompleter :: CompletercrReader :: ReadM aA Parser a is an option parser returning a value of type a.
Functor ParserDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesApplicative ParserDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesAlternative ParserDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesParserMrunParserM :: forall x. (r -> Parser x) -> Parser xA shell complete function.
CompleterrunCompleter :: String -> IO [String]Smart constructor for a Completer
Show CompletionResultDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesParserFailureexecFailure :: String -> (h, ExitCode, Int)Functor ParserFailureDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow h => Show (ParserFailure h)Defined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesResult of execParserPure.
Monad ParserResultDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesFunctor ParserResultDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesApplicative ParserResultDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow a => Show (ParserResult a)Defined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesPolicy for how to handle options within the parse
IntersperseThe default policy, options and arguments can
be interspersed.
A -- option can be passed to ensure all following
commands are treated as arguments.
NoIntersperseOptions must all come before arguments, once a
single positional argument or subcommand is parsed,
all remaining arguments are treated as positionals.
A -- option can be passed if the first positional
one needs starts with -.
AllPositionalsNo options are parsed at all, all arguments are
treated as positionals.
Is the policy used after -- is encountered.
ForwardOptionsOptions and arguments can be interspersed, but if a given option is not found, it is treated as a positional argument. This is sometimes useful if one is passing through most options to another tool, but are supplying just a few of their own options.
ArgumentReachabilityargumentIsUnreachable :: BoolIf the result is a positional, if it can't be accessed in the current parser position ( first arg )
Eq ArgumentReachabilityDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow ArgumentReachabilityDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesEq AltNodeTypeDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow AltNodeTypeDefined in optparse-applicative-0.18.1.0 · Options.Applicative.TypesShow ParserHelpDefined in optparse-applicative-0.18.1.0 · Options.Applicative.Help.TypesSemigroup ParserHelpDefined in optparse-applicative-0.18.1.0 · Options.Applicative.Help.TypesMonoid ParserHelpDefined in optparse-applicative-0.18.1.0 · Options.Applicative.Help.Typesforall a. SomeParser (Parser a)Subparser context, containing the name of the subparser and its parser info.
Used by parserFailure to display relevant usage information when parsing inside a subparser fails.
forall a. Context String (ParserInfo a)Show IsCmdStartDefined in optparse-applicative-0.18.1.0 · Options.Applicative.Types