From 294a3509934e1abc35d2d287c4377600f4e196cb Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 16 May 2012 07:57:10 +0000 Subject: [PATCH] promote Hledger.Query to second level --- hledger-lib/Hledger.hs | 6 +++--- hledger-lib/Hledger/Data/Journal.hs | 2 +- hledger-lib/Hledger/Data/Ledger.hs | 2 +- hledger-lib/Hledger/{Data => }/Query.hs | 8 ++++---- hledger-lib/Hledger/Reports.hs | 2 +- hledger-lib/hledger-lib.cabal | 2 +- hledger/Hledger/Cli/Histogram.hs | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) rename hledger-lib/Hledger/{Data => }/Query.hs (99%) diff --git a/hledger-lib/Hledger.hs b/hledger-lib/Hledger.hs index 7454adc0b..e0212647f 100644 --- a/hledger-lib/Hledger.hs +++ b/hledger-lib/Hledger.hs @@ -1,6 +1,6 @@ module Hledger ( module Hledger.Data - ,module Hledger.Data.Query + ,module Hledger.Query ,module Hledger.Read ,module Hledger.Reports ,module Hledger.Utils @@ -10,7 +10,7 @@ where import Test.HUnit import Hledger.Data -import Hledger.Data.Query +import Hledger.Query import Hledger.Read hiding (samplejournal) import Hledger.Reports import Hledger.Utils @@ -18,7 +18,7 @@ import Hledger.Utils tests_Hledger = TestList [ tests_Hledger_Data - ,tests_Hledger_Data_Query + ,tests_Hledger_Query ,tests_Hledger_Read ,tests_Hledger_Reports ] diff --git a/hledger-lib/Hledger/Data/Journal.hs b/hledger-lib/Hledger/Data/Journal.hs index 9e45e2205..269302a9d 100644 --- a/hledger-lib/Hledger/Data/Journal.hs +++ b/hledger-lib/Hledger/Data/Journal.hs @@ -73,7 +73,7 @@ import Hledger.Data.Dates import Hledger.Data.Transaction import Hledger.Data.Posting import Hledger.Data.TimeLog -import Hledger.Data.Query +import Hledger.Query instance Show Journal where diff --git a/hledger-lib/Hledger/Data/Ledger.hs b/hledger-lib/Hledger/Data/Ledger.hs index d6cf9f6e7..71150ffed 100644 --- a/hledger-lib/Hledger/Data/Ledger.hs +++ b/hledger-lib/Hledger/Data/Ledger.hs @@ -20,7 +20,7 @@ import Hledger.Data.Account (nullacct) import Hledger.Data.AccountName import Hledger.Data.Journal import Hledger.Data.Posting -import Hledger.Data.Query +import Hledger.Query instance Show Ledger where diff --git a/hledger-lib/Hledger/Data/Query.hs b/hledger-lib/Hledger/Query.hs similarity index 99% rename from hledger-lib/Hledger/Data/Query.hs rename to hledger-lib/Hledger/Query.hs index 1a1f19fa6..9e87b227e 100644 --- a/hledger-lib/Hledger/Data/Query.hs +++ b/hledger-lib/Hledger/Query.hs @@ -5,7 +5,7 @@ transactions..) by various criteria, and a parser for query expressions. -} -module Hledger.Data.Query ( +module Hledger.Query ( -- * Query and QueryOpt Query(..), QueryOpt(..), @@ -29,7 +29,7 @@ module Hledger.Data.Query ( matchesPosting, matchesTransaction, -- * tests - tests_Hledger_Data_Query + tests_Hledger_Query ) where import Data.Either @@ -561,8 +561,8 @@ postingEffectiveDate p = maybe Nothing (Just . transactionEffectiveDate) $ ptran -- tests -tests_Hledger_Data_Query :: Test -tests_Hledger_Data_Query = TestList $ +tests_Hledger_Query :: Test +tests_Hledger_Query = TestList $ tests_simplifyQuery ++ tests_words'' ++ tests_filterQuery diff --git a/hledger-lib/Hledger/Reports.hs b/hledger-lib/Hledger/Reports.hs index 9b2e16dcd..92eb36003 100644 --- a/hledger-lib/Hledger/Reports.hs +++ b/hledger-lib/Hledger/Reports.hs @@ -63,7 +63,7 @@ import Text.Printf import Hledger.Data import Hledger.Read (amount') -import Hledger.Data.Query +import Hledger.Query import Hledger.Utils -- | Standard options for customising report filtering and output, diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index a3ef197de..92d0b15fd 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -46,7 +46,7 @@ library Hledger.Data.TimeLog Hledger.Data.Transaction Hledger.Data.Types - Hledger.Data.Query + Hledger.Query Hledger.Read Hledger.Read.CsvReader Hledger.Read.JournalReader diff --git a/hledger/Hledger/Cli/Histogram.hs b/hledger/Hledger/Cli/Histogram.hs index a6ebf2f29..def15fb2c 100644 --- a/hledger/Hledger/Cli/Histogram.hs +++ b/hledger/Hledger/Cli/Histogram.hs @@ -14,7 +14,7 @@ import Text.Printf import Hledger.Cli.Options import Hledger.Data import Hledger.Reports -import Hledger.Data.Query +import Hledger.Query import Prelude hiding (putStr) import Hledger.Utils.UTF8IOCompat (putStr)