| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OptparseApplicative.Simple.Parser
Synopsis
- type Parser = Parser
- argument :: Text -> Maybe Char -> Maybe Text -> Maybe (a, Text) -> Parser a -> Parser a
- showableArgument :: Show a => Text -> Maybe Char -> Maybe Text -> Maybe a -> Parser a -> Parser a
- lenientArgument :: LenientParser a => Text -> Maybe Char -> Maybe Text -> Maybe (a, Text) -> Parser a
- showableLenientArgument :: (LenientParser a, Show a) => Text -> Maybe Char -> Maybe Text -> Maybe a -> Parser a
Documentation
Specification of a command line arguments parser and help generator.
Has instances of Functor, Applicative and Alternative,
which you can use for composition.
Arguments
| :: Text | Long name |
| -> Maybe Char | Possible short name |
| -> Maybe Text | Possible description |
| -> Maybe (a, Text) | Possible default value with its text representation to display in the generated help |
| -> Parser a | Attoparsec parser of the value. The "attoparsec-data" package provides such parsers for a lot of standard types |
| -> Parser a |
Definition of a single argument.
lenientArgument :: LenientParser a => Text -> Maybe Char -> Maybe Text -> Maybe (a, Text) -> Parser a Source #
Same as argument, only provided with a default parser.
showableLenientArgument :: (LenientParser a, Show a) => Text -> Maybe Char -> Maybe Text -> Maybe a -> Parser a Source #
Same as showableArgument, only provided with a default parser.