envparse-0.5.0: Parse environment variables
Safe HaskellSafe-Inferred
LanguageHaskell2010

Env.Internal.Help

Synopsis

Documentation

helpInfo :: Info e -> Parser e b -> [(String, e)] -> String Source #

helpDoc :: Parser e a -> String Source #

A pretty-printed list of recognized environment variables suitable for usage messages

data Info e Source #

Parser's metadata

type ErrorHandler e = String -> e -> Maybe String Source #

Given a variable name and an error value, try to produce a useful error message

defaultErrorHandler :: (AsUnset e, AsEmpty e, AsUnread e) => ErrorHandler e Source #

The default error handler

header :: String -> Info e -> Info e Source #

Set the help text header (it usually includes the application's name and version)

desc :: String -> Info e -> Info e Source #

Set the short description

footer :: String -> Info e -> Info e Source #

Set the help text footer (it usually includes examples)

handleError :: ErrorHandler e -> Info x -> Info e Source #

An error handler