1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Model.Filter where
5 import Data.Typeable ()
7 import qualified Hcompta.Model.Account as Account
8 import Hcompta.Model.Account (Account)
9 import qualified Hcompta.Model.Amount as Amount
10 import Hcompta.Model.Amount (Amount)
11 import qualified Hcompta.Model.Date as Date
12 import qualified Hcompta.Model.Transaction.Tag as Tag
14 -- * The 'Filter' type
17 = Account Comparison_String Account
18 | Account_Tag Comparison_String String (Maybe (Comparison_String, String))
19 | Amount (Comparison_Num, Comparison_Num_Absolute) Amount
22 | Balance (Comparison_Num, Comparison_Num_Absolute) Amount
23 | Commodity Comparison_String String
26 | Depth Comparison_Num Int
27 | Description Comparison_String String
33 | Tag Comparison_String Tag.Name (Maybe (Comparison_String, Tag.Value))
34 deriving (Data, Eq, Show, Typeable)
38 | Comparison_Num_Lt_Eq
40 | Comparison_Num_Gt_Eq
42 deriving (Data, Eq, Show, Typeable)
44 type Comparison_Num_Absolute
47 data Comparison_String
48 = Comparison_String_Eq
49 | Comparison_String_Regexp
50 deriving (Data, Eq, Show, Typeable)