optparse-applicative-0.18.1.0: Utilities and combinators for parsing command line options

Safe Haskell | Safe-Inferred
Language | Haskell98

Options.Applicative.Types

Synopsis

- data ParseError
  - = ErrorMsg String
  - | InfoMsg String
  - | ShowHelpText (Maybe String)
  - | UnknownError
  - | MissingError IsCmdStart SomeParser
  - | ExpectsArgError String
  - | UnexpectedError String SomeParser
- data ParserInfo a = ParserInfo {
  - infoParser :: Parser a
  - infoFullDesc :: Bool
  - infoProgDesc :: Chunk Doc
  - infoHeader :: Chunk Doc
  - infoFooter :: Chunk Doc
  - infoFailureCode :: Int
  - infoPolicy :: ArgPolicy
  }
- data ParserPrefs = ParserPrefs {
  - prefMultiSuffix :: String
  - prefDisambiguate :: Bool
  - prefShowHelpOnError :: Bool
  - prefShowHelpOnEmpty :: Bool
  - prefBacktrack :: Backtracking
  - prefColumns :: Int
  - prefHelpLongEquals :: Bool
  - prefHelpShowGlobal :: Bool
  - prefTabulateFill :: Int
  }
- data Option a = Option {
  - optMain :: OptReader a
  - optProps :: OptProperties
  }
- data OptName
  - = OptShort !Char
  - | OptLong !String
- isShortName :: OptName -> Bool
- isLongName :: OptName -> Bool
- data OptReader a
  - = OptReader [OptName] (CReader a) (String -> ParseError)
  - | FlagReader [OptName] !a
  - | ArgReader (CReader a)
  - | CmdReader (Maybe String) [(String, ParserInfo a)]
- data OptProperties = OptProperties {
  - propVisibility :: OptVisibility
  - propHelp :: Chunk Doc
  - propMetaVar :: String
  - propShowDefault :: Maybe String
  - propShowGlobal :: Bool
  - propDescMod :: Maybe (Doc -> Doc)
  }
- data OptVisibility
  - = Internal
  - | Hidden
  - | Visible
- data Backtracking
  - = Backtrack
  - | NoBacktrack
  - | SubparserInline
- newtype ReadM a = ReadM {
  - unReadM :: ReaderT String (Except ParseError) a
  }
- readerAsk :: ReadM String
- readerAbort :: ParseError -> ReadM a
- readerError :: String -> ReadM a
- data CReader a = CReader {
  - crCompleter :: Completer
  - crReader :: ReadM a
  }
- data Parser a
  - = NilP (Maybe a)
  - | OptP (Option a)
  - | MultP (Parser (x -> a)) (Parser x)
  - | AltP (Parser a) (Parser a)
  - | BindP (Parser x) (x -> Parser a)
- newtype ParserM r = ParserM {
  - runParserM :: forall x. (r -> Parser x) -> Parser x
  }
- newtype Completer = Completer {
  - runCompleter :: String -> IO [String]
  }
- mkCompleter :: (String -> IO [String]) -> Completer
- newtype CompletionResult = CompletionResult {
  - execCompletion :: String -> IO String
  }
- newtype ParserFailure h = ParserFailure {
  - execFailure :: String -> (h, ExitCode, Int)
  }
- data ParserResult a
  - = Success a
  - | Failure (ParserFailure ParserHelp)
  - | CompletionInvoked CompletionResult
- overFailure :: (ParserHelp -> ParserHelp) -> ParserResult a -> ParserResult a
- type Args = [String]
- data ArgPolicy
  - = Intersperse
  - | NoIntersperse
  - | AllPositionals
  - | ForwardOptions
- newtype ArgumentReachability = ArgumentReachability {
  - argumentIsUnreachable :: Bool
  }
- data AltNodeType
  - = MarkDefault
  - | NoDefault
- data OptTree a
  - = Leaf a
  - | MultNode [OptTree a]
  - | AltNode AltNodeType [OptTree a]
  - | BindNode (OptTree a)
- data ParserHelp = ParserHelp {
  - helpError :: Chunk Doc
  - helpSuggestions :: Chunk Doc
  - helpHeader :: Chunk Doc
  - helpUsage :: Chunk Doc
  - helpDescription :: Chunk Doc
  - helpBody :: Chunk Doc
  - helpGlobals :: Chunk Doc
  - helpFooter :: Chunk Doc
  }
- data SomeParser = SomeParser (Parser a)
- data Context = Context String (ParserInfo a)
- data IsCmdStart
  - = CmdStart
  - | CmdCont
- fromM :: ParserM a -> Parser a
- oneM :: Parser a -> ParserM a
- manyM :: Parser a -> ParserM [a]
- someM :: Parser a -> ParserM [a]
- filterOptional :: OptTree a -> OptTree a
- optVisibility :: Option a -> OptVisibility
- optMetaVar :: Option a -> String
- optHelp :: Option a -> Chunk Doc
- optShowDefault :: Option a -> Maybe String
- optDescMod :: Option a -> Maybe (Doc -> Doc)

# Documentation

data ParseError Source #

Constructors

ErrorMsg String |
InfoMsg String |
ShowHelpText (Maybe String) |
UnknownError |
MissingError IsCmdStart SomeParser |
ExpectsArgError String |
UnexpectedError String SomeParser |

#### Instances

Instances details

Monoid ParseError Source # |
Instance details Defined in Options.Applicative.Types Methods mempty :: ParseError Source # mappend :: ParseError -> ParseError -> ParseError Source # mconcat :: [ParseError] -> ParseError Source #
Semigroup ParseError Source # |
Instance details Defined in Options.Applicative.Types Methods (<>) :: ParseError -> ParseError -> ParseError Source # sconcat :: NonEmpty ParseError -> ParseError Source # stimes :: Integral b => b -> ParseError -> ParseError Source #

data ParserInfo a Source #

A full description for a runnable `Parser` for a program.

Constructors

ParserInfo |

Fields

- infoParser :: Parser a

  the option parser for the program

- infoFullDesc :: Bool

  whether the help text should contain full documentation

- infoProgDesc :: Chunk Doc

  brief parser description

- infoHeader :: Chunk Doc

  header of the full parser description

- infoFooter :: Chunk Doc

  footer of the full parser description

- infoFailureCode :: Int

  exit code for a parser failure

- infoPolicy :: ArgPolicy

  allow regular options and flags to occur after arguments (default: InterspersePolicy)

#### Instances

Instances details

Functor ParserInfo Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> ParserInfo a -> ParserInfo b Source # (<$) :: a -> ParserInfo b -> ParserInfo a Source #

data ParserPrefs Source #

Global preferences for a top-level `Parser`.

Constructors

ParserPrefs |

Fields

- prefMultiSuffix :: String

  metavar suffix for multiple options

- prefDisambiguate :: Bool

  automatically disambiguate abbreviations (default: False)

- prefShowHelpOnError :: Bool

  always show help text on parse errors (default: False)

- prefShowHelpOnEmpty :: Bool

  show the help text for a command or subcommand if it fails with no input (default: False)

- prefBacktrack :: Backtracking

  backtrack to parent parser when a subcommand fails (default: Backtrack)

- prefColumns :: Int

  number of columns in the terminal, used to format the help page (default: 80)

- prefHelpLongEquals :: Bool

  when displaying long names in usage and help, use an '=' sign for long names, rather than a single space (default: False)

- prefHelpShowGlobal :: Bool

  when displaying subparsers' usage help, show parent options under a "global options" section (default: False)

- prefTabulateFill :: Int

  Indentation width for tables

#### Instances

Instances details

Show ParserPrefs Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> ParserPrefs -> ShowS Source # show :: ParserPrefs -> String Source # showList :: [ParserPrefs] -> ShowS Source #
Eq ParserPrefs Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: ParserPrefs -> ParserPrefs -> Bool Source # (/=) :: ParserPrefs -> ParserPrefs -> Bool Source #

data Option a Source #

A single option of a parser.

Constructors

Option |

Fields

- optMain :: OptReader a

  reader for this option

- optProps :: OptProperties

  properties of this option

#### Instances

Instances details

Functor Option Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> Option a -> Option b Source # (<$) :: a -> Option b -> Option a Source #
Show (Option a) Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> Option a -> ShowS Source # show :: Option a -> String Source # showList :: [Option a] -> ShowS Source #

data OptName Source #

Constructors

OptShort !Char |
OptLong !String |

#### Instances

Instances details

Show OptName Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> OptName -> ShowS Source # show :: OptName -> String Source # showList :: [OptName] -> ShowS Source #
Eq OptName Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: OptName -> OptName -> Bool Source # (/=) :: OptName -> OptName -> Bool Source #
Ord OptName Source # |
Instance details Defined in Options.Applicative.Types Methods compare :: OptName -> OptName -> Ordering Source # (<) :: OptName -> OptName -> Bool Source # (<=) :: OptName -> OptName -> Bool Source # (>) :: OptName -> OptName -> Bool Source # (>=) :: OptName -> OptName -> Bool Source # max :: OptName -> OptName -> OptName Source # min :: OptName -> OptName -> OptName Source #

isShortName :: OptName -> Bool Source #

isLongName :: OptName -> Bool Source #

data OptReader a Source #

An `OptReader` defines whether an option matches an command line argument.

Constructors

OptReader [OptName] (CReader a) (String -> ParseError) | option reader
FlagReader [OptName] !a | flag reader
ArgReader (CReader a) | argument reader
CmdReader (Maybe String) [(String, ParserInfo a)] | command reader

#### Instances

Instances details

Functor OptReader Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> OptReader a -> OptReader b Source # (<$) :: a -> OptReader b -> OptReader a Source #

data OptProperties Source #

Specification for an individual parser option.

Constructors

OptProperties |

Fields

- propVisibility :: OptVisibility

  whether this flag is shown in the brief description

- propHelp :: Chunk Doc

  help text for this option

- propMetaVar :: String

  metavariable for this option

- propShowDefault :: Maybe String

  what to show in the help text as the default

- propShowGlobal :: Bool

  whether the option is presented in global options text

- propDescMod :: Maybe (Doc -> Doc)

  a function to run over the brief description

#### Instances

Instances details

Show OptProperties Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> OptProperties -> ShowS Source # show :: OptProperties -> String Source # showList :: [OptProperties] -> ShowS Source #

data OptVisibility Source #

Visibility of an option in the help text.

Constructors

Internal | does not appear in the help text at all
Hidden | only visible in the full description
Visible | visible both in the full and brief descriptions

#### Instances

Instances details

Show OptVisibility Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> OptVisibility -> ShowS Source # show :: OptVisibility -> String Source # showList :: [OptVisibility] -> ShowS Source #
Eq OptVisibility Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: OptVisibility -> OptVisibility -> Bool Source # (/=) :: OptVisibility -> OptVisibility -> Bool Source #
Ord OptVisibility Source # |

Instance details

Defined in Options.Applicative.Types

Methods

compare :: OptVisibility -> OptVisibility -> Ordering Source #

(<) :: OptVisibility -> OptVisibility -> Bool Source #

(<=) :: OptVisibility -> OptVisibility -> Bool Source #

(>) :: OptVisibility -> OptVisibility -> Bool Source #

(>=) :: OptVisibility -> OptVisibility -> Bool Source #

max :: OptVisibility -> OptVisibility -> OptVisibility Source #

min :: OptVisibility -> OptVisibility -> OptVisibility Source #

data Backtracking Source #

Constructors

Backtrack |
NoBacktrack |
SubparserInline |

#### Instances

Instances details

Show Backtracking Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> Backtracking -> ShowS Source # show :: Backtracking -> String Source # showList :: [Backtracking] -> ShowS Source #
Eq Backtracking Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: Backtracking -> Backtracking -> Bool Source # (/=) :: Backtracking -> Backtracking -> Bool Source #

newtype ReadM a Source #

A newtype over 'ReaderT String Except', used by option readers.

Constructors

ReadM |

Fields

- unReadM :: ReaderT String (Except ParseError) a

#### Instances

Instances details

Alternative ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods empty :: ReadM a Source # (<|>) :: ReadM a -> ReadM a -> ReadM a Source # some :: ReadM a -> ReadM [a] Source # many :: ReadM a -> ReadM [a] Source #
Applicative ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods pure :: a -> ReadM a Source # (<*>) :: ReadM (a -> b) -> ReadM a -> ReadM b Source # liftA2 :: (a -> b -> c) -> ReadM a -> ReadM b -> ReadM c Source # (*>) :: ReadM a -> ReadM b -> ReadM b Source # (<*) :: ReadM a -> ReadM b -> ReadM a Source #
Functor ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> ReadM a -> ReadM b Source # (<$) :: a -> ReadM b -> ReadM a Source #
Monad ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods (>>=) :: ReadM a -> (a -> ReadM b) -> ReadM b Source # (>>) :: ReadM a -> ReadM b -> ReadM b Source # return :: a -> ReadM a Source #
MonadPlus ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods mzero :: ReadM a Source # mplus :: ReadM a -> ReadM a -> ReadM a Source #
MonadFail ReadM Source # |
Instance details Defined in Options.Applicative.Types Methods fail :: String -> ReadM a Source #

readerAsk :: ReadM String Source #

Return the value being read.

readerAbort :: ParseError -> ReadM a Source #

Abort option reader by exiting with a `ParseError`.

readerError :: String -> ReadM a Source #

Abort option reader by exiting with an error message.

data CReader a Source #

Constructors

CReader |

Fields

- crCompleter :: Completer
- crReader :: ReadM a

#### Instances

Instances details

Functor CReader Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> CReader a -> CReader b Source # (<$) :: a -> CReader b -> CReader a Source #

data Parser a Source #

A `Parser a` is an option parser returning a value of type `a`.

Constructors

NilP (Maybe a) |
OptP (Option a) |
MultP (Parser (x -> a)) (Parser x) |
AltP (Parser a) (Parser a) |
BindP (Parser x) (x -> Parser a) |

#### Instances

Instances details

Alternative Parser Source # |
Instance details Defined in Options.Applicative.Types Methods empty :: Parser a Source # (<|>) :: Parser a -> Parser a -> Parser a Source # some :: Parser a -> Parser [a] Source # many :: Parser a -> Parser [a] Source #
Applicative Parser Source # |
Instance details Defined in Options.Applicative.Types Methods pure :: a -> Parser a Source # (<*>) :: Parser (a -> b) -> Parser a -> Parser b Source # liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c Source # (*>) :: Parser a -> Parser b -> Parser b Source # (<*) :: Parser a -> Parser b -> Parser a Source #
Functor Parser Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> Parser a -> Parser b Source # (<$) :: a -> Parser b -> Parser a Source #

newtype ParserM r Source #

Constructors

ParserM |

Fields

- runParserM :: forall x. (r -> Parser x) -> Parser x

#### Instances

Instances details

Applicative ParserM Source # |
Instance details Defined in Options.Applicative.Types Methods pure :: a -> ParserM a Source # (<*>) :: ParserM (a -> b) -> ParserM a -> ParserM b Source # liftA2 :: (a -> b -> c) -> ParserM a -> ParserM b -> ParserM c Source # (*>) :: ParserM a -> ParserM b -> ParserM b Source # (<*) :: ParserM a -> ParserM b -> ParserM a Source #
Functor ParserM Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> ParserM a -> ParserM b Source # (<$) :: a -> ParserM b -> ParserM a Source #
Monad ParserM Source # |
Instance details Defined in Options.Applicative.Types Methods (>>=) :: ParserM a -> (a -> ParserM b) -> ParserM b Source # (>>) :: ParserM a -> ParserM b -> ParserM b Source # return :: a -> ParserM a Source #

newtype Completer Source #

A shell complete function.

Constructors

Completer |

Fields

- runCompleter :: String -> IO [String]

#### Instances

Instances details

Monoid Completer Source # |
Instance details Defined in Options.Applicative.Types Methods mempty :: Completer Source # mappend :: Completer -> Completer -> Completer Source # mconcat :: [Completer] -> Completer Source #
Semigroup Completer Source # |
Instance details Defined in Options.Applicative.Types Methods (<>) :: Completer -> Completer -> Completer Source # sconcat :: NonEmpty Completer -> Completer Source # stimes :: Integral b => b -> Completer -> Completer Source #

mkCompleter :: (String -> IO [String]) -> Completer Source #

Smart constructor for a `Completer`

newtype CompletionResult Source #

Constructors

CompletionResult |

Fields

- execCompletion :: String -> IO String

#### Instances

Instances details

Show CompletionResult Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> CompletionResult -> ShowS Source # show :: CompletionResult -> String Source # showList :: [CompletionResult] -> ShowS Source #

newtype ParserFailure h Source #

Constructors

ParserFailure |

Fields

- execFailure :: String -> (h, ExitCode, Int)

#### Instances

Instances details

Functor ParserFailure Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> ParserFailure a -> ParserFailure b Source # (<$) :: a -> ParserFailure b -> ParserFailure a Source #
Show h => Show (ParserFailure h) Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> ParserFailure h -> ShowS Source # show :: ParserFailure h -> String Source # showList :: [ParserFailure h] -> ShowS Source #

data ParserResult a Source #

Result of `execParserPure`.

Constructors

Success a |
Failure (ParserFailure ParserHelp) |
CompletionInvoked CompletionResult |

#### Instances

Instances details

Applicative ParserResult Source # |
Instance details Defined in Options.Applicative.Types Methods pure :: a -> ParserResult a Source # (<*>) :: ParserResult (a -> b) -> ParserResult a -> ParserResult b Source # liftA2 :: (a -> b -> c) -> ParserResult a -> ParserResult b -> ParserResult c Source # (*>) :: ParserResult a -> ParserResult b -> ParserResult b Source # (<*) :: ParserResult a -> ParserResult b -> ParserResult a Source #
Functor ParserResult Source # |
Instance details Defined in Options.Applicative.Types Methods fmap :: (a -> b) -> ParserResult a -> ParserResult b Source # (<$) :: a -> ParserResult b -> ParserResult a Source #
Monad ParserResult Source # |
Instance details Defined in Options.Applicative.Types Methods (>>=) :: ParserResult a -> (a -> ParserResult b) -> ParserResult b Source # (>>) :: ParserResult a -> ParserResult b -> ParserResult b Source # return :: a -> ParserResult a Source #
Show a => Show (ParserResult a) Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> ParserResult a -> ShowS Source # show :: ParserResult a -> String Source # showList :: [ParserResult a] -> ShowS Source #

overFailure :: (ParserHelp -> ParserHelp) -> ParserResult a -> ParserResult a Source #

type Args = [String] Source #

data ArgPolicy Source #

Policy for how to handle options within the parse

Constructors

Intersperse | The default policy, options and arguments can be interspersed. A `--` option can be passed to ensure all following commands are treated as arguments.
NoIntersperse | Options 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 `-`.
AllPositionals | No options are parsed at all, all arguments are treated as positionals. Is the policy used after `--` is encountered.
ForwardOptions | Options 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.

#### Instances

Instances details

Show ArgPolicy Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> ArgPolicy -> ShowS Source # show :: ArgPolicy -> String Source # showList :: [ArgPolicy] -> ShowS Source #
Eq ArgPolicy Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: ArgPolicy -> ArgPolicy -> Bool Source # (/=) :: ArgPolicy -> ArgPolicy -> Bool Source #
Ord ArgPolicy Source # |

Instance details

Defined in Options.Applicative.Types

Methods

compare :: ArgPolicy -> ArgPolicy -> Ordering Source #

(<) :: ArgPolicy -> ArgPolicy -> Bool Source #

(<=) :: ArgPolicy -> ArgPolicy -> Bool Source #

(>) :: ArgPolicy -> ArgPolicy -> Bool Source #

(>=) :: ArgPolicy -> ArgPolicy -> Bool Source #

max :: ArgPolicy -> ArgPolicy -> ArgPolicy Source #

min :: ArgPolicy -> ArgPolicy -> ArgPolicy Source #

newtype ArgumentReachability Source #

Constructors

ArgumentReachability |

Fields

- argumentIsUnreachable :: Bool

  If the result is a positional, if it can't be accessed in the current parser position ( first arg )

#### Instances

Instances details

Show ArgumentReachability Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> ArgumentReachability -> ShowS Source # show :: ArgumentReachability -> String Source # showList :: [ArgumentReachability] -> ShowS Source #
Eq ArgumentReachability Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: ArgumentReachability -> ArgumentReachability -> Bool Source # (/=) :: ArgumentReachability -> ArgumentReachability -> Bool Source #

data AltNodeType Source #

This type encapsulates whether an `AltNode` of an `OptTree` should be displayed with brackets around it.

Constructors

MarkDefault |
NoDefault |

#### Instances

Instances details

Show AltNodeType Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> AltNodeType -> ShowS Source # show :: AltNodeType -> String Source # showList :: [AltNodeType] -> ShowS Source #
Eq AltNodeType Source # |
Instance details Defined in Options.Applicative.Types Methods (==) :: AltNodeType -> AltNodeType -> Bool Source # (/=) :: AltNodeType -> AltNodeType -> Bool Source #

data OptTree a Source #

Constructors

Leaf a |
MultNode [OptTree a] |
AltNode AltNodeType [OptTree a] |
BindNode (OptTree a) |

#### Instances

Instances details

Show a => Show (OptTree a) Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> OptTree a -> ShowS Source # show :: OptTree a -> String Source # showList :: [OptTree a] -> ShowS Source #

data ParserHelp Source #

Constructors

ParserHelp |

Fields

- helpError :: Chunk Doc
- helpSuggestions :: Chunk Doc
- helpHeader :: Chunk Doc
- helpUsage :: Chunk Doc
- helpDescription :: Chunk Doc
- helpBody :: Chunk Doc
- helpGlobals :: Chunk Doc
- helpFooter :: Chunk Doc

#### Instances

Instances details

Monoid ParserHelp Source # |
Instance details Defined in Options.Applicative.Help.Types Methods mempty :: ParserHelp Source # mappend :: ParserHelp -> ParserHelp -> ParserHelp Source # mconcat :: [ParserHelp] -> ParserHelp Source #
Semigroup ParserHelp Source # |
Instance details Defined in Options.Applicative.Help.Types Methods (<>) :: ParserHelp -> ParserHelp -> ParserHelp Source # sconcat :: NonEmpty ParserHelp -> ParserHelp Source # stimes :: Integral b => b -> ParserHelp -> ParserHelp Source #
Show ParserHelp Source # |
Instance details Defined in Options.Applicative.Help.Types Methods showsPrec :: Int -> ParserHelp -> ShowS Source # show :: ParserHelp -> String Source # showList :: [ParserHelp] -> ShowS Source #

data SomeParser Source #

Constructors

SomeParser (Parser a) |

data Context Source #

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.

Constructors

Context String (ParserInfo a) |

data IsCmdStart Source #

Constructors

CmdStart |
CmdCont |

#### Instances

Instances details

Show IsCmdStart Source # |
Instance details Defined in Options.Applicative.Types Methods showsPrec :: Int -> IsCmdStart -> ShowS Source # show :: IsCmdStart -> String Source # showList :: [IsCmdStart] -> ShowS Source #

fromM :: ParserM a -> Parser a Source #

oneM :: Parser a -> ParserM a Source #

manyM :: Parser a -> ParserM [a] Source #

someM :: Parser a -> ParserM [a] Source #

filterOptional :: OptTree a -> OptTree a Source #

optVisibility :: Option a -> OptVisibility Source #

optMetaVar :: Option a -> String Source #

optHelp :: Option a -> Chunk Doc Source #

optShowDefault :: Option a -> Maybe String Source #

optDescMod :: Option a -> Maybe (Doc -> Doc) Source #