Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Step
- = DateQuestion Comment
- | DescriptionQuestion Day Comment
- | AccountQuestion Transaction Comment
- | AmountQuestion AccountName Transaction Comment
- | FinalQuestion Transaction Duplicate
- data MaybeStep
- data MatchAlgo
- = Fuzzy
- | Substrings
- nextStep :: Journal -> DateFormat -> Either Text Text -> Step -> IO (Either Text MaybeStep)
- undo :: Step -> Either Text Step
- context :: Journal -> MatchAlgo -> DateFormat -> Text -> Step -> IO [Text]
- suggest :: Journal -> DateFormat -> Step -> IO (Maybe Text)
- setCurrentComment :: Comment -> Step -> Step
- getCurrentComment :: Step -> Comment
- setTransactionComment :: Comment -> Step -> Step
- getTransactionComment :: Step -> Comment
- accountsByFrequency :: Journal -> [AccountName]
- isDuplicateTransaction :: Journal -> Transaction -> Bool
Documentation
DateQuestion Comment | |
DescriptionQuestion Day Comment | |
AccountQuestion Transaction Comment | |
AmountQuestion AccountName Transaction Comment | |
FinalQuestion Transaction Duplicate |
nextStep :: Journal -> DateFormat -> Either Text Text -> Step -> IO (Either Text MaybeStep) Source #
undo :: Step -> Either Text Step Source #
Reverses the last step.
Returns (Left errorMessage), if the step can't be reversed
suggest :: Journal -> DateFormat -> Step -> IO (Maybe Text) Source #
Suggest the initial text of the entry box for each step
For example, it suggests today for the date prompt
setCurrentComment :: Comment -> Step -> Step Source #
getCurrentComment :: Step -> Comment Source #
setTransactionComment :: Comment -> Step -> Step Source #
getTransactionComment :: Step -> Comment Source #
Helpers exported for easier testing
accountsByFrequency :: Journal -> [AccountName] Source #
All accounts occuring in the journal sorted in descending order of appearance.
isDuplicateTransaction :: Journal -> Transaction -> Bool Source #
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.