Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- accountQuery :: AccountName -> Text
- accountOnlyQuery :: AccountName -> Text
- balanceReportAsHtml :: Eq r => (r, r) -> r -> Bool -> Journal -> Text -> [QueryOpt] -> BalanceReport -> HtmlUrl r
- helplink :: Text -> Text -> HtmlUrl r
- mixedAmountAsHtml :: MixedAmount -> HtmlUrl a
- fromFormSuccess :: Applicative m => m a -> FormResult a -> m a
- writeJournalTextIfValidAndChanged :: MonadHandler m => FilePath -> Text -> m (Either String ())
- journalFile404 :: FilePath -> Journal -> HandlerFor m (FilePath, Text)
- transactionFragment :: Journal -> Transaction -> String
- removeDates :: Text -> [Text]
- removeInacct :: Text -> [Text]
- replaceInacct :: Text -> Text -> Text
Documentation
accountQuery :: AccountName -> Text Source #
accountOnlyQuery :: AccountName -> Text Source #
balanceReportAsHtml :: Eq r => (r, r) -> r -> Bool -> Journal -> Text -> [QueryOpt] -> BalanceReport -> HtmlUrl r Source #
Render a BalanceReport as html.
mixedAmountAsHtml :: MixedAmount -> HtmlUrl a Source #
fromFormSuccess :: Applicative m => m a -> FormResult a -> m a Source #
writeJournalTextIfValidAndChanged :: MonadHandler m => FilePath -> Text -> m (Either String ()) Source #
A helper for postEditR/postUploadR: check that the given text parses as a Journal, and if so, write it to the given file, if the text has changed. Or, return any error message encountered.
As a convenience for data received from web forms, which does not have normalised line endings, line endings will be normalised (to n) before parsing.
The file will be written (if changed) with the current system's native line endings (see writeFileWithBackupIfChanged).
journalFile404 :: FilePath -> Journal -> HandlerFor m (FilePath, Text) Source #
transactionFragment :: Journal -> Transaction -> String Source #
removeDates :: Text -> [Text] Source #
removeInacct :: Text -> [Text] Source #