| Safe Haskell | Safe-Infered |
|---|
Options.Applicative.Types
- data ParserInfo a = ParserInfo {
- infoParser :: Parser a
- infoFullDesc :: Bool
- infoProgDesc :: String
- infoHeader :: String
- infoFooter :: String
- infoFailureCode :: Int
- data ParserPrefs = ParserPrefs {}
- data Context where
- Context :: Maybe String -> ParserInfo a -> Context
- NullContext :: Context
- type P = ErrorT String (Writer Context)
- data Option a = Option {
- optMain :: OptReader a
- optProps :: OptProperties
- data OptName
- data OptReader a
- data OptProperties = OptProperties {}
- data OptVisibility
- data Parser a where
- data ParserFailure = ParserFailure {
- errMessage :: String -> String
- errExitCode :: ExitCode
- data OptHelpInfo = OptHelpInfo {
- hinfoMulti :: Bool
- hinfoDefault :: Bool
- data OptTree a
- optVisibility :: Option a -> OptVisibility
- optMetaVar :: Option a -> String
- optHelp :: Option a -> String
- optShowDefault :: Option a -> Maybe String
Documentation
data ParserInfo a Source
A full description for a runnable Parser for a program.
Constructors
| ParserInfo | |
Fields
| |
Instances
data ParserPrefs Source
Global preferences for a top-level Parser.
Constructors
| ParserPrefs | |
Fields
| |
Constructors
| Context :: Maybe String -> ParserInfo a -> Context | |
| NullContext :: Context |
A single option of a parser.
Constructors
| Option | |
Fields
| |
An OptReader defines whether an option matches an command line argument.
data OptProperties Source
Specification for an individual parser option.
Constructors
| OptProperties | |
Fields
| |
data OptVisibility Source
Visibility of an option in the help text.
Constructors
| Internal | does not appear in the help text at all |
| Hidden | only visible in the full description |
| Visible | visible both in the full and brief descriptions |
Instances
A Parser a is an option parser returning a value of type a.
Constructors
| NilP :: Maybe a -> Parser a | |
| OptP :: Option a -> Parser a | |
| MultP :: Parser (a -> b) -> Parser a -> Parser b | |
| AltP :: Parser a -> Parser a -> Parser a | |
| BindP :: Parser a -> (a -> Parser b) -> Parser b |
Instances
data ParserFailure Source
Result after a parse error.
Constructors
| ParserFailure | |
Fields
| |
Instances
data OptHelpInfo Source
Constructors
| OptHelpInfo | |
Fields
| |
optVisibility :: Option a -> OptVisibilitySource
optMetaVar :: Option a -> StringSource
optShowDefault :: Option a -> Maybe StringSource