Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Step
- = DateQuestion Comment
- | DescriptionQuestion Day Comment
- | AccountQuestion Transaction Comment
- | AmountQuestion AccountName Transaction Comment
- | FinalQuestion Transaction
- 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]
Documentation
DateQuestion Comment | |
DescriptionQuestion Day Comment | |
AccountQuestion Transaction Comment | |
AmountQuestion AccountName Transaction Comment | |
FinalQuestion Transaction |
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.