Options.Applicative.Help.Core

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)] #

Generate descriptions for commands.

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

Generate a brief help text for a parser.

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

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

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

Generate a full help text for a parser

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

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

data ParserHelp #

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

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 #

Generate the help text for a program.

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

Generate option summary.

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