hledger-iadd-1.3.5: A terminal UI as drop-in replacement for hledger add

Safe HaskellNone
LanguageHaskell2010

Model

Contents

Synopsis

Documentation

data Step #

Instances

Eq Step # 

Methods

(==) :: Step -> Step -> Bool #

(/=) :: Step -> Step -> Bool #

Show Step # 

Methods

showsPrec :: Int -> Step -> ShowS #

show :: Step -> String #

showList :: [Step] -> ShowS #

undo :: Step -> Either Text Step #

Reverses the last step.

Returns (Left errorMessage), if the step can't be reversed

suggest :: Journal -> DateFormat -> Step -> IO (Maybe Text) #

Suggest the initial text of the entry box for each step

For example, it suggests today for the date prompt

setCurrentComment :: Comment -> Step -> Step #

getCurrentComment :: Step -> Comment #

setTransactionComment :: Comment -> Step -> Step #

Helpers exported for easier testing

accountsByFrequency :: Journal -> [AccountName] #

All accounts occuring in the journal sorted in descending order of appearance.

isDuplicateTransaction :: Journal -> Transaction -> Bool #

Deterimine if a given transaction already occurs in the journal

This function ignores certain attributes of transactions, postings and amounts that are either artifacts of knot-tying or are purely for presentation.

See the various ...attributes functions in the where clause for details.