penny-0.24.0.0: Extensible double-entry accounting system

Safe HaskellNone

Penny.Brenner.Util

Synopsis

Documentation

errExit :: String -> IO aSource

Print an error message and exit.

getFitAcct :: Maybe FitAcct -> IO FitAcctSource

Gets the FitAcct, if it was provided. If it was not provided, exit with an error message.

loadDbSource

Arguments

:: AllowNew

Is a new file allowed?

-> DbLocation

DB location

-> IO DbList 

Loads the database from disk. If allowNew is True, then does not fail if the file was not found.

version :: IntSource

File version. Increment this when anything in the file format changes.

saveDb :: DbLocation -> DbList -> IO ()Source

Writes a new database to disk.

parseQty :: Amount -> QtySource

Parses quantities from amounts. All amounts should be verified as having only digits, optionally followed by a point and then more digits. All these values should parse. So if there is a problem it is a programmer error. Apply error.

showPosting :: Posting -> StringSource

Shows a Posting in human readable format.