]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Transaction.hs
Modification : sépare hcompta-ledger de hcompta-lib.
[comptalang.git] / lib / Hcompta / Transaction.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# LANGUAGE NamedFieldPuns #-}
4 {-# LANGUAGE OverloadedStrings #-}
5 {-# LANGUAGE ScopedTypeVariables #-}
6 {-# LANGUAGE TupleSections #-}
7 {-# LANGUAGE TypeFamilies #-}
8 module Hcompta.Transaction where
9
10 import Data.Text (Text)
11
12 import Hcompta.Date (Date)
13 import Hcompta.Posting (Posting)
14
15 -- * Class 'Transaction'
16
17 class
18 ( Posting (Transaction_Posting t)
19 ) => Transaction t where
20 type Transaction_Posting t
21 transaction_date :: t -> Date
22 transaction_description :: t -> Description
23 transaction_postings :: t -> [Transaction_Posting t]
24
25 type Description = Text