buchhaltung-0.0.5: Automates most of your plain text accounting data entry in ledger format.

Safe HaskellNone
LanguageHaskell2010

Buchhaltung.Uniques

Synopsis

Documentation

type M r m = ContT r (RWST () () (Map Key Entry) m) Source #

The monad stack

type Key = ([(CommoditySymbol, Quantity)], AccountName, Day, Int) Source #

the key that is used to compare transactions. The Int is a counter, to ensure there are no actual duplicates in the map.

Instead duplicates are found by extraction of a key range using split. See findDuplicates.

addNew Source #

Arguments

:: (MonadIO m, MonadReader (Options user Config env) m) 
=> [FilledEntry]

new candidates including entries already existing in journal possible duplicates

-> Journal 
-> m [Entry] 

key :: Transaction -> Int -> Key Source #

loop :: (MonadIO m, MonadReader (Options user Config env) m) => (() -> M r m ()) -> Int -> Int -> FilledEntry -> M r m () Source #

loop through all existing possible duplicates of a new transaction

checkOrAsk Source #

Arguments

:: (MonadIO m, MonadReader (Options user Config env) m) 
=> (() -> M r m ()) 
-> (Key, FilledEntry) 
-> TL.Text

message

-> [((Key, Entry), Maybe Int)] 
-> M r m () 

check single new entry against a list of conflict candidates, and insert new entry (if list is empty), or keep old entry (if identical to new one), or ask weither to modify old entry or insert new entry.

prettyPrint Source #

Arguments

:: Maybe Int 
-> FilledEntry 
-> Entry 
-> TL.Text

Message

-> Int

Remaining

-> T.Text