opt-env-conf-0.3.0.0: Settings parsing for Haskell: command-line arguments, environment variables, and configuration values.
Safe HaskellSafe-Inferred
LanguageHaskell2010

OptEnvConf.Run

Synopsis

Documentation

runSettingsParser Source #

Arguments

:: HasParser a 
=> Version

Program version, get this from Paths_your_package_name

-> String

Program description

-> IO a 

Run runParser on your Settings' type's settingsParser.

This is most likely the function you want to be using.

runParser Source #

Arguments

:: Version

Program version, get this from Paths_your_package_name

-> String

Program description

-> Parser a 
-> IO a 

Run a parser

This function with exit on:

  • Parse failure: show a nice error message.
  • -h|--help: Show help text
  • --version: Show version information
  • --render-man-page: Render a man page
  • --bash-completion-script: Render a bash completion script
  • --zsh-completion-script: Render a zsh completion script
  • --fish-completion-script: Render a fish completion script
  • query-opt-env-conf-completion: Perform a completion query

This gets the arguments and environment variables from the current process.

runParserOn :: Maybe TerminalCapabilities -> Parser a -> Args -> EnvMap -> Maybe Object -> IO (Either (NonEmpty ParseError) a) Source #

Run a parser on given arguments and environment instead of getting them from the current process.

internalParser :: Version -> Parser a -> Parser (Internal a) Source #