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
10 import Data.Text (Text)
12 import Hcompta.Date (Date)
13 import Hcompta.Posting (Posting)
15 -- * Class 'Transaction'
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]
25 type Description = Text