Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- helpInfo :: Info e -> Parser e b -> [(String, e)] -> String
- helpDoc :: Parser e a -> String
- data Info e
- type ErrorHandler e = String -> e -> Maybe String
- defaultInfo :: Info Error
- defaultErrorHandler :: (AsUnset e, AsEmpty e, AsUnread e) => ErrorHandler e
- header :: String -> Info e -> Info e
- desc :: String -> Info e -> Info e
- footer :: String -> Info e -> Info e
- handleError :: ErrorHandler e -> Info x -> Info e
Documentation
helpDoc :: Parser e a -> String Source #
A pretty-printed list of recognized environment variables suitable for usage messages
type ErrorHandler e = String -> e -> Maybe String Source #
Given a variable name and an error value, try to produce a useful error message
defaultInfo :: Info Error Source #
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)
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