lib:Hledger.Query: queryIsAmtOrSym

This commit is contained in:
Simon Michael 2025-06-03 17:01:37 -10:00
parent 5bbf31096d
commit bdd2018663

View File

@ -44,6 +44,7 @@ module Hledger.Query (
queryIsReal,
queryIsAmt,
queryIsSym,
queryIsAmtOrSym,
queryIsStartDateOnly,
queryIsTransactionRelated,
-- * accessors
@ -685,6 +686,9 @@ queryIsSym :: Query -> Bool
queryIsSym (Sym _) = True
queryIsSym _ = False
queryIsAmtOrSym :: Query -> Bool
queryIsAmtOrSym = liftA2 (||) queryIsAmt queryIsSym
-- | Does this query specify a start date and nothing else (that would
-- filter postings prior to the date) ?
-- When the flag is true, look for a starting secondary date instead.