-- * The 'Filter' type
data Filter
- = Account Comparison_String Account
- | Account_Tag Comparison_String String (Maybe (Comparison_String, String))
- | Amount (Comparison_Num, Comparison_Num_Absolute) Amount
+ = Account Comp_String Account
+ | Account_Tag Comp_String String (Maybe (Comp_String, String))
+ | Amount Comp_Num Comp_Num_Absolute Amount
| And Filter Filter
| Any
- | Balance (Comparison_Num, Comparison_Num_Absolute) Amount
- | Commodity Comparison_String String
- | Date Date.Span
- | Date2 Date.Span
- | Depth Comparison_Num Int
- | Description Comparison_String String
+ | Balance Comp_Num Comp_Num_Absolute Amount
+ | Date Date.Span
+ | Depth Comp_Num Int
+ | Description Comp_String String
| None
| Not Filter
| Or Filter Filter
| Real Bool
| Status Bool
- | Tag Comparison_String Tag.Name (Maybe (Comparison_String, Tag.Value))
+ | Tag Comp_String Tag.Name (Maybe (Comp_String, Tag.Value))
+ | Unit Comp_String String
deriving (Data, Eq, Show, Typeable)
-data Comparison_Num
- = Comparison_Num_Lt
- | Comparison_Num_Lt_Eq
- | Comparison_Num_Gt
- | Comparison_Num_Gt_Eq
- | Comparison_Num_Eq
+data Comp_Num
+ = Comp_Num_Lt
+ | Comp_Num_Lt_Eq
+ | Comp_Num_Gt
+ | Comp_Num_Gt_Eq
+ | Comp_Num_Eq
deriving (Data, Eq, Show, Typeable)
-type Comparison_Num_Absolute
+type Comp_Num_Absolute
= Bool
-data Comparison_String
- = Comparison_String_Eq
- | Comparison_String_Regexp
+data Comp_String
+ = Comp_String_Eq
+ | Comp_String_Regexp
deriving (Data, Eq, Show, Typeable)