1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Ledger.Account where
4 import Data.Data (Data(..))
5 import Data.Eq (Eq(..))
6 import Data.List.NonEmpty (NonEmpty(..))
7 import Data.Text (Text)
8 import Data.Typeable (Typeable)
9 import Text.Regex.TDFA (Regex)
10 import Text.Show (Show)
12 -- import qualified Hcompta as H
13 import Text.Regex.TDFA.Show ()
17 type Account_Section = Text
18 type Account = NonEmpty Account_Section
19 account :: Account_Section -> [Account_Section] -> Account
25 = [Account_Joker_Section]
26 data Account_Joker_Section
28 | Account_Joker_Section Text
29 deriving (Data, Eq, Show, Typeable)
34 = Account_Pattern_Exact Account
35 | Account_Pattern_Joker Account_Joker
36 | Account_Pattern_Regex Regex
37 deriving (Show, Typeable)