query cleanups
This commit is contained in:
parent
ddda6705c0
commit
2feb36e57f
@ -15,7 +15,6 @@ module Hledger.Data (
|
||||
module Hledger.Data.Dates,
|
||||
module Hledger.Data.Journal,
|
||||
module Hledger.Data.Ledger,
|
||||
module Hledger.Data.Query,
|
||||
module Hledger.Data.Posting,
|
||||
module Hledger.Data.TimeLog,
|
||||
module Hledger.Data.Transaction,
|
||||
@ -32,7 +31,6 @@ import Hledger.Data.Commodity
|
||||
import Hledger.Data.Dates
|
||||
import Hledger.Data.Journal
|
||||
import Hledger.Data.Ledger
|
||||
import Hledger.Data.Query
|
||||
import Hledger.Data.Posting
|
||||
import Hledger.Data.TimeLog
|
||||
import Hledger.Data.Transaction
|
||||
|
||||
@ -11,6 +11,7 @@ module Hledger.Data.Query (
|
||||
QueryOpt(..),
|
||||
-- * parsing
|
||||
parseQuery,
|
||||
simplifyQuery,
|
||||
-- * accessors
|
||||
queryIsNull,
|
||||
queryStartDate,
|
||||
@ -207,6 +208,10 @@ parseBool s = s `elem` truestrings
|
||||
truestrings :: [String]
|
||||
truestrings = ["1","t","true"]
|
||||
|
||||
simplifyQuery :: Query -> Query
|
||||
simplifyQuery (And [q]) = q
|
||||
simplifyQuery q = q
|
||||
|
||||
-- * accessors
|
||||
|
||||
-- | Does this query match everything ?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user