]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Posting.hs
Modification : sépare hcompta-ledger de hcompta-lib.
[comptalang.git] / lib / Hcompta / Posting.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# LANGUAGE TypeFamilies #-}
4 module Hcompta.Posting where
5
6 import Data.Foldable (Foldable(..))
7
8 import Hcompta.Account
9 import Hcompta.Amount
10
11 class
12 ( Account (Posting_Account p)
13 , Amount (Posting_Amount p)
14 , Foldable (Posting_Amounts p)
15 ) => Posting p where
16 type Posting_Account p
17 type Posting_Amount p
18 type Posting_Amounts p :: * -> *
19 posting_account :: p -> Posting_Account p
20 posting_amounts :: p -> Posting_Amounts p (Posting_Amount p)