{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} module Hcompta.Transaction where import Data.Text (Text) import Hcompta.Date (Date) import Hcompta.Posting (Posting) -- * Class 'Transaction' class ( Posting (Transaction_Posting t) ) => Transaction t where type Transaction_Posting t transaction_date :: t -> Date transaction_description :: t -> Description transaction_postings :: t -> [Transaction_Posting t] type Description = Text