1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Format.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.Show (Show)
11 import Hcompta.Lib.Parsec ()
12 import Hcompta.Lib.Regex (Regex)
16 type Account_Section = Text
17 type Account = NonEmpty Account_Section
18 account :: Account_Section -> [Account_Section] -> Account
24 = [Account_Joker_Section]
25 data Account_Joker_Section
27 | Account_Joker_Section Text
28 deriving (Data, Eq, Show, Typeable)
33 = Account_Pattern_Exact Account
34 | Account_Pattern_Joker Account_Joker
35 | Account_Pattern_Regex Regex
36 deriving (Show, Typeable)