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

Safe Haskell | Safe-Inferred
Language | Haskell98

Options.Applicative.Help.Core

Synopsis

- cmdDesc :: ParserPrefs -> Parser a -> [(Maybe String, Chunk Doc)]
- briefDesc :: ParserPrefs -> Parser a -> Chunk Doc
- missingDesc :: ParserPrefs -> Parser a -> Chunk Doc
- fullDesc :: ParserPrefs -> Parser a -> Chunk Doc
- globalDesc :: ParserPrefs -> Parser a -> Chunk Doc
- 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
  }
- errorHelp :: Chunk Doc -> ParserHelp
- headerHelp :: Chunk Doc -> ParserHelp
- suggestionsHelp :: Chunk Doc -> ParserHelp
- usageHelp :: Chunk Doc -> ParserHelp
- descriptionHelp :: Chunk Doc -> ParserHelp
- bodyHelp :: Chunk Doc -> ParserHelp
- footerHelp :: Chunk Doc -> ParserHelp
- globalsHelp :: Chunk Doc -> ParserHelp
- parserHelp :: ParserPrefs -> Parser a -> ParserHelp
- parserUsage :: ParserPrefs -> Parser a -> String -> Doc
- parserGlobals :: ParserPrefs -> Parser a -> ParserHelp

# Documentation

cmdDesc :: ParserPrefs -> Parser a -> [(Maybe String, Chunk Doc)] Source #

Generate descriptions for commands.

briefDesc :: ParserPrefs -> Parser a -> Chunk Doc Source #

Generate a brief help text for a parser.

missingDesc :: ParserPrefs -> Parser a -> Chunk Doc Source #

Generate a brief help text for a parser, only including mandatory options and arguments.

fullDesc :: ParserPrefs -> Parser a -> Chunk Doc Source #

Generate a full help text for a parser

globalDesc :: ParserPrefs -> Parser a -> Chunk Doc Source #

Generate a help text for the parser, showing only what is relevant in the "Global options: section"

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 #

errorHelp :: Chunk Doc -> ParserHelp Source #

headerHelp :: Chunk Doc -> ParserHelp Source #

suggestionsHelp :: Chunk Doc -> ParserHelp Source #

usageHelp :: Chunk Doc -> ParserHelp Source #

descriptionHelp :: Chunk Doc -> ParserHelp Source #

bodyHelp :: Chunk Doc -> ParserHelp Source #

footerHelp :: Chunk Doc -> ParserHelp Source #

globalsHelp :: Chunk Doc -> ParserHelp Source #

parserHelp :: ParserPrefs -> Parser a -> ParserHelp Source #

Generate the help text for a program.

parserUsage :: ParserPrefs -> Parser a -> String -> Doc Source #

Generate option summary.

parserGlobals :: ParserPrefs -> Parser a -> ParserHelp Source #