shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.Configuration.Args.Parsing.Utils

Synopsis

Documentation

withDisabledParser Source #

Arguments

:: Parser (Maybe a)

Main parser.

-> String

Name for this option, to be used in disabled switch name.

-> Parser (WithDisabled a) 

Adds a '--no-x' switch to the parser.

withDisabledParserOpts Source #

Arguments

:: Mod FlagFields Bool

Disabled switch options.

-> Parser (Maybe a)

Main parser

-> String

Name for this option, to be used in disabled switch name.

-> Parser (WithDisabled a) 

Like withDisabledParser, except it also takes an arg for the disabled switch options.

mkHelp :: forall (f :: Type -> Type) a. String -> Mod f a Source #

autoStripUnderscores :: Read a => ReadM a Source #

Reads Text, strips underscores, then uses the Read class. This is essentially auto but removes underscores. This is used for nicer numeric values e.g. allowing parsing "1_000_000" as a Num.