Safe Haskell | None |
---|---|
Language | Haskell2010 |
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)]
- setopt :: String -> String -> RawOpts -> RawOpts
- setboolopt :: String -> RawOpts -> RawOpts
- inRawOpts :: String -> RawOpts -> Bool
- boolopt :: String -> RawOpts -> Bool
- stringopt :: String -> RawOpts -> String
- maybestringopt :: String -> RawOpts -> Maybe String
- listofstringopt :: String -> RawOpts -> [String]
- intopt :: String -> RawOpts -> Int
- maybeintopt :: String -> RawOpts -> Maybe Int
- optserror :: String -> a