{-|
An 'Account' stores, for efficiency: an 'AccountName', all transactions in
the account (excluding subaccounts), and the account balance (including
subaccounts).
-}moduleLedger.AccountwhereimportLedger.UtilsimportLedger.TypesimportLedger.AmountinstanceShowAccountwhereshow(Accountatsb)=printf"Account %s with %d txns and %s balance"a(lengthts)(showMixedAmountb)instanceEqAccountwhere(==)(Accountn1t1b1)(Accountn2t2b2)=n1==n2&&t1==t2&&b1==b2nullacct=Account""[]nullmixedamt