registry-options-0.2.0.0: application options parsing
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Registry.Options.Help

Description

Support for storing help messages associated to options and for displaying a full help message

Synopsis

Documentation

data Help Source #

This data type contains optional fields describing either a full command or just a single option A command refers to a list of command fields but can also contain subcommands

Constructors

Help 

Fields

Instances

Instances details
Monoid Help Source # 
Instance details

Defined in Data.Registry.Options.Help

Methods

mempty :: Help #

mappend :: Help -> Help -> Help #

mconcat :: [Help] -> Help #

Semigroup Help Source # 
Instance details

Defined in Data.Registry.Options.Help

Methods

(<>) :: Help -> Help -> Help #

sconcat :: NonEmpty Help -> Help #

stimes :: Integral b => b -> Help -> Help #

Show Help Source # 
Instance details

Defined in Data.Registry.Options.Help

Methods

showsPrec :: Int -> Help -> ShowS #

show :: Help -> String #

showList :: [Help] -> ShowS #

Eq Help Source # 
Instance details

Defined in Data.Registry.Options.Help

Methods

(==) :: Help -> Help -> Bool #

(/=) :: Help -> Help -> Bool #

Lift Help Source # 
Instance details

Defined in Data.Registry.Options.TH

Methods

lift :: Quote m => Help -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Help -> Code m Help #

type HelpUpdate = Help -> Help Source #

Function updating the help

makeHelp :: [HelpUpdate] -> Help Source #

Create a Help from a list of updates

noHelp :: Help Source #

Empty Help description

shortDescription :: Text -> HelpUpdate Source #

Create a Help value with a short command description

longDescription :: Text -> HelpUpdate Source #

Create a Help value with a long command description

commandHelp :: Text -> Text -> Text -> Help Source #

Create a Help value with a command name, a long and a short description

noCommandName :: Help -> Help Source #

Create a Help value with no command name

defaultSubcommand :: Help -> Help Source #

Set the current subcommand as the default one

alt :: Help -> Help -> Help Source #

Create a Help description for the alternative of 2 different help descriptions This function is used for collecting the helps of 2 parsers when using the | operator

  • two commands end-up being the subcommands of the alternative
  • a command alternated with some fields becomes a subcommand

fromCliOption :: OptionDescription -> Help Source #

Create a Help value from the description of a simple option