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

Safe Haskell | Safe
Language | Haskell98

Options.Applicative.Help.Core

Synopsis

- cmdDesc :: Parser a -> [(Maybe String, Chunk Doc)]
- briefDesc :: ParserPrefs -> Parser a -> Chunk Doc
- missingDesc :: ParserPrefs -> Parser a -> Chunk Doc
- fold_tree :: OptTree (Chunk Doc) -> Chunk Doc
- fullDesc :: ParserPrefs -> Parser a -> Chunk Doc
- data ParserHelp = ParserHelp {
  - helpError :: Chunk Doc
  - helpHeader :: Chunk Doc
  - helpUsage :: Chunk Doc
  - helpBody :: Chunk Doc
  - helpFooter :: Chunk Doc
  }
- errorHelp :: Chunk Doc -> ParserHelp
- headerHelp :: Chunk Doc -> ParserHelp
- usageHelp :: Chunk Doc -> ParserHelp
- bodyHelp :: Chunk Doc -> ParserHelp
- footerHelp :: Chunk Doc -> ParserHelp
- parserHelp :: ParserPrefs -> Parser a -> ParserHelp
- parserUsage :: ParserPrefs -> Parser a -> String -> Doc

# Documentation

cmdDesc :: 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.

fold_tree :: OptTree (Chunk Doc) -> Chunk Doc #

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

Generate a full help text for a parser.

data ParserHelp #

Constructors

ParserHelp |
Fields helpError :: Chunk Doc helpHeader :: Chunk Doc helpUsage :: Chunk Doc helpBody :: Chunk Doc helpFooter :: Chunk Doc

Instances

Show ParserHelp # |
Methods showsPrec :: Int -> ParserHelp -> ShowS # show :: ParserHelp -> String # showList :: [ParserHelp] -> ShowS #
Semigroup ParserHelp # |
Methods (<>) :: ParserHelp -> ParserHelp -> ParserHelp # sconcat :: NonEmpty ParserHelp -> ParserHelp # stimes :: Integral b => b -> ParserHelp -> ParserHelp #
Monoid ParserHelp # |
Methods mempty :: ParserHelp # mappend :: ParserHelp -> ParserHelp -> ParserHelp # mconcat :: [ParserHelp] -> ParserHelp #

errorHelp :: Chunk Doc -> ParserHelp #

headerHelp :: Chunk Doc -> ParserHelp #

usageHelp :: Chunk Doc -> ParserHelp #

bodyHelp :: Chunk Doc -> ParserHelp #

footerHelp :: Chunk Doc -> ParserHelp #

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

Generate the help text for a program.

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

Generate option summary.