{-# LANGUAGE DeriveDataTypeable #-} module Hcompta.JCC.Account where import Data.Data (Data(..)) import Data.Eq (Eq(..)) import Data.List.NonEmpty (NonEmpty(..)) import Data.Text (Text) import Data.Typeable (Typeable) import Text.Show (Show) -- import Text.Parsec..Parsec () -- import Hcompta.Lib.Regex (Regex) import qualified Hcompta.Account as H -- * Type 'Account' type Account_Section = Text type Account = NonEmpty Account_Section account :: H.Account_Section Account -> [H.Account_Section Account] -> Account account = (:|) -- ** Type 'Joker' type Account_Joker = [Account_Joker_Section] data Account_Joker_Section = Account_Joker_Any | Account_Joker_Section Text deriving (Data, Eq, Show, Typeable) -- ** Type 'Pattern' data Account_Pattern = Account_Pattern_Exact Account | Account_Pattern_Joker Account_Joker -- Account_Pattern_Regex Regex deriving (Show, Typeable)