Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Command-line options parser.
- anyString :: Text -> Consumer [Text] (Option a) Text
- constant :: Text -> Text -> Consumer [Text] (Option a) Text
- flag :: Text -> Text -> v -> Consumer [Text] (Option a) v
- switch :: Text -> Text -> Consumer [Text] (Option a) Bool
- prefix :: Text -> Text -> Consumer [Text] (Option a) Text
- arg :: Text -> Text -> Consumer [Text] (Option a) Text
- stop :: Consumer [Text] (Option a) a -> Consumer [Text] (Option a) ()
- data Option a
- textDescription :: Description (Option a) -> Text
- textOpt :: Option a -> Text
Combinators
anyString :: Text -> Consumer [Text] (Option a) Text Source
Consume one argument from the argument list and pops it from the start of the list.
Consume one argument from the argument list which must match the given string.
Find a value flag which must succeed.
Find a boolean flag. Always succeeds. Omission counts as False
.
Find an argument prefixed by -X.
Find a named argument e.g. --name value
.
:: Consumer [Text] (Option a) a | A parser which, when it succeeds, causes the whole parser to stop. |
-> Consumer [Text] (Option a) () |
If the consumer succeeds, stops the whole parser and returns immediately.
Description
Description of a commandline option.
textDescription :: Description (Option a) -> Text Source
Make a text description of the command line options.