hledger-lib-0.23.2: Core data types, parsers and utilities for the hledger accounting tool.

Safe HaskellNone



hledger's cmdargs modes parse command-line arguments to an intermediate format, RawOpts (an association list), rather than a fixed ADT like CliOpts. This allows the modes and flags to be reused more easily by hledger commands/scripts in this and other packages.



type RawOpts = [(String, String)]Source

The result of running cmdargs: an association list of option names to string values.

inRawOpts :: String -> RawOpts -> BoolSource

Is the named option present ?

optserror :: String -> aSource

Raise an error, showing the specified message plus a hint about --help.