| Safe Haskell | Safe-Infered |
|---|
Options.Applicative.Types
- data ParserInfo a = ParserInfo {
- _infoParser :: Parser a
- _infoDesc :: ParserDesc
- data ParserDesc = ParserDesc {}
- data ParserPrefs = ParserPrefs {}
- data Context where
- Context :: Maybe String -> ParserInfo a -> Context
- NullContext :: Context
- type P = ErrorT String (Writer Context)
- infoParser :: Lens (ParserInfo a) (Parser a)
- infoDesc :: Lens (ParserInfo a) ParserDesc
- infoFullDesc :: Lens (ParserInfo a) Bool
- infoProgDesc :: Lens (ParserInfo a) String
- infoHeader :: Lens (ParserInfo a) String
- infoFooter :: Lens (ParserInfo a) String
- infoFailureCode :: Lens (ParserInfo a) Int
- descFull :: Lens ParserDesc Bool
- descProg :: Lens ParserDesc String
- descHeader :: Lens ParserDesc String
- descFooter :: Lens ParserDesc String
- descFailureCode :: Lens ParserDesc Int
- data Option a = Option {
- _optMain :: OptReader a
- _optProps :: OptProperties a
- data OptName
- data OptReader a
- data OptProperties a = OptProperties {}
- data OptVisibility
- data Parser a where
- data ParserFailure = ParserFailure {
- errMessage :: String -> String
- errExitCode :: ExitCode
- data OptHelpInfo = OptHelpInfo {
- hinfoMulti :: Bool
- hinfoDefault :: Bool
- optMain :: Lens (Option a) (OptReader a)
- optDefault :: Lens (Option a) (Maybe a)
- optVisibility :: Lens (Option a) OptVisibility
- optHelp :: Lens (Option a) String
- optMetaVar :: Lens (Option a) String
- propDefault :: Lens (OptProperties a) (Maybe a)
- propVisibility :: Lens (OptProperties a) OptVisibility
- propHelp :: Lens (OptProperties a) String
- propMetaVar :: Lens (OptProperties a) String
- prefMultiSuffix :: Lens ParserPrefs String
Documentation
data ParserInfo a Source
A full description for a runnable Parser for a program.
Constructors
| ParserInfo | |
Fields
| |
Instances
data ParserDesc Source
Attributes that can be associated to a Parser.
Constructors
| ParserDesc | |
Fields
| |
data ParserPrefs Source
Global preferences for a top-level Parser.
Constructors
| ParserPrefs | |
Fields
| |
Constructors
| Context :: Maybe String -> ParserInfo a -> Context | |
| NullContext :: Context |
infoParser :: Lens (ParserInfo a) (Parser a)Source
infoDesc :: Lens (ParserInfo a) ParserDescSource
infoFullDesc :: Lens (ParserInfo a) BoolSource
infoProgDesc :: Lens (ParserInfo a) StringSource
infoHeader :: Lens (ParserInfo a) StringSource
infoFooter :: Lens (ParserInfo a) StringSource
infoFailureCode :: Lens (ParserInfo a) IntSource
A single option of a parser.
Constructors
| Option | |
Fields
| |
An OptReader defines whether an option matches an command line argument.
data OptProperties a Source
Specification for an individual parser option.
Constructors
| OptProperties | |
Fields
| |
Instances
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
| |
optDefault :: Lens (Option a) (Maybe a)Source
optMetaVar :: Lens (Option a) StringSource
propDefault :: Lens (OptProperties a) (Maybe a)Source
propHelp :: Lens (OptProperties a) StringSource
propMetaVar :: Lens (OptProperties a) StringSource