hledger-lib-1.52.1: A library providing the core functionality of hledger

Safe Haskell | None
Language | GHC2021

Hledger.Data.BalanceData

Contents

- Orphan instances

Description

A 'BalanceData is a data type tracking a number of postings, exclusive, and inclusive balance for given date ranges.

Synopsis

- mapBalanceData :: (MixedAmount -> MixedAmount) -> BalanceData -> BalanceData
- opBalanceData :: (MixedAmount -> MixedAmount -> MixedAmount) -> BalanceData -> BalanceData -> BalanceData
- tests_BalanceData :: TestTree

# Documentation

mapBalanceData :: (MixedAmount -> MixedAmount) -> BalanceData -> BalanceData Source #

Apply an operation to both `MixedAmount` in an `BalanceData`.

opBalanceData :: (MixedAmount -> MixedAmount -> MixedAmount) -> BalanceData -> BalanceData -> BalanceData Source #

Merge two `BalanceData`, using the given operation to combine their amounts.

tests_BalanceData :: TestTree Source #

# Orphan instances

Monoid BalanceData Source # |
Instance details Methods mempty :: BalanceData Source # mappend :: BalanceData -> BalanceData -> BalanceData Source # mconcat :: [BalanceData] -> BalanceData Source #
Semigroup BalanceData Source # |
Instance details Methods (<>) :: BalanceData -> BalanceData -> BalanceData Source # sconcat :: NonEmpty BalanceData -> BalanceData Source # stimes :: Integral b => b -> BalanceData -> BalanceData Source #
Show BalanceData Source # |
Instance details Methods showsPrec :: Int -> BalanceData -> ShowS Source # show :: BalanceData -> String Source # showList :: [BalanceData] -> ShowS Source #