]> Git — Sourcephile - haskell/literate-accounting.git/blob - src/Haccounting.hs
iface: rename {Symantic.Compta => Haccounting}
[haskell/literate-accounting.git] / src / Haccounting.hs
1 module Haccounting where
2
3 -- * Class 'Postable'
4 class Postable repr where
5 post :: HasCallStack => repr TyAccount -> repr TyAmount -> repr TyPost
6 infixr 4 -=, +=
7 (-=) ::
8 HasCallStack =>
9 Postable repr => Negable (repr TyAmount) =>
10 repr TyAccount -> repr TyAmount -> repr TyPost
11 (+=) ::
12 HasCallStack => Postable repr =>
13 repr TyAccount -> repr TyAmount -> repr TyPost
14 (-=) acct = post acct . negate
15 (+=) = post