Safe Haskell | Safe-Inferred |
---|
- helper :: Parser (a -> a)
- execParser :: ParserInfo a -> IO a
- execParserPure :: ParserPrefs -> ParserInfo a -> [String] -> Either ParserFailure a
- customExecParser :: ParserPrefs -> ParserInfo a -> IO a
- usage :: ParserPrefs -> Parser a -> String -> String
- data ParserFailure = ParserFailure {
- errMessage :: String -> IO String
- errExitCode :: ExitCode
Extra parser utilities
This module contains high-level functions to run parsers.
execParser :: ParserInfo a -> IO aSource
Run a program description.
Parse command line arguments. Display help text and exit if any parse error occurs.
:: ParserPrefs | Global preferences for this parser |
-> ParserInfo a | Description of the program to run |
-> [String] | Program arguments |
-> Either ParserFailure a |
A pure version execParser
.
customExecParser :: ParserPrefs -> ParserInfo a -> IO aSource
Run a program description with custom preferences.
data ParserFailure Source
Result after a parse error.
ParserFailure | |
|