From 69defd497ff5e27824e4b32d801a54750d9b4212 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 14 Jun 2019 16:17:06 -0700 Subject: [PATCH] ;lib: refactor: Data.Prices -> Data.Valuation --- hledger-lib/Hledger/Data.hs | 6 +++--- hledger-lib/Hledger/Data/Journal.hs | 1 - hledger-lib/Hledger/Data/Posting.hs | 2 +- hledger-lib/Hledger/Data/{Prices.hs => Valuation.hs} | 6 +++--- hledger-lib/hledger-lib.cabal | 6 +++--- hledger-lib/package.yaml | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) rename hledger-lib/Hledger/Data/{Prices.hs => Valuation.hs} (99%) diff --git a/hledger-lib/Hledger/Data.hs b/hledger-lib/Hledger/Data.hs index b742a467f..fc907f453 100644 --- a/hledger-lib/Hledger/Data.hs +++ b/hledger-lib/Hledger/Data.hs @@ -16,7 +16,6 @@ module Hledger.Data ( module Hledger.Data.Dates, module Hledger.Data.Journal, module Hledger.Data.Ledger, - module Hledger.Data.Prices, module Hledger.Data.Period, module Hledger.Data.PeriodicTransaction, module Hledger.Data.Posting, @@ -26,6 +25,7 @@ module Hledger.Data ( module Hledger.Data.Transaction, module Hledger.Data.TransactionModifier, module Hledger.Data.Types, + module Hledger.Data.Valuation, tests_Data ) where @@ -37,7 +37,6 @@ import Hledger.Data.Commodity import Hledger.Data.Dates import Hledger.Data.Journal import Hledger.Data.Ledger -import Hledger.Data.Prices import Hledger.Data.Period import Hledger.Data.PeriodicTransaction import Hledger.Data.Posting @@ -47,6 +46,7 @@ import Hledger.Data.Timeclock import Hledger.Data.Transaction import Hledger.Data.TransactionModifier import Hledger.Data.Types +import Hledger.Data.Valuation import Hledger.Utils.Test tests_Data = tests "Data" [ @@ -55,7 +55,7 @@ tests_Data = tests "Data" [ ,tests_Journal ,tests_Ledger ,tests_Posting - ,tests_Prices + ,tests_Valuation ,tests_StringFormat ,tests_Timeclock ,tests_Transaction diff --git a/hledger-lib/Hledger/Data/Journal.hs b/hledger-lib/Hledger/Data/Journal.hs index 47ffa3404..3d0f3a895 100644 --- a/hledger-lib/Hledger/Data/Journal.hs +++ b/hledger-lib/Hledger/Data/Journal.hs @@ -116,7 +116,6 @@ import Hledger.Data.Types import Hledger.Data.AccountName import Hledger.Data.Amount import Hledger.Data.Dates --- import Hledger.Data.Prices import Hledger.Data.Transaction import Hledger.Data.TransactionModifier import Hledger.Data.Posting diff --git a/hledger-lib/Hledger/Data/Posting.hs b/hledger-lib/Hledger/Data/Posting.hs index 911a35e4e..165aee930 100644 --- a/hledger-lib/Hledger/Data/Posting.hs +++ b/hledger-lib/Hledger/Data/Posting.hs @@ -87,7 +87,7 @@ import Hledger.Data.Types import Hledger.Data.Amount import Hledger.Data.AccountName import Hledger.Data.Dates (nulldate, spanContainsDate) -import Hledger.Data.Prices +import Hledger.Data.Valuation diff --git a/hledger-lib/Hledger/Data/Prices.hs b/hledger-lib/Hledger/Data/Valuation.hs similarity index 99% rename from hledger-lib/Hledger/Data/Prices.hs rename to hledger-lib/Hledger/Data/Valuation.hs index e7f15b9bf..9abf527f7 100644 --- a/hledger-lib/Hledger/Data/Prices.hs +++ b/hledger-lib/Hledger/Data/Valuation.hs @@ -10,7 +10,7 @@ looking up historical market prices (exchange rates) between commodities. {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -module Hledger.Data.Prices ( +module Hledger.Data.Valuation ( amountValueAtDate ,amountApplyValuation ,mixedAmountValueAtDate @@ -18,7 +18,7 @@ module Hledger.Data.Prices ( ,marketPriceReverse ,priceDirectiveToMarketPrice ,priceLookup - ,tests_Prices + ,tests_Valuation ) where @@ -40,7 +40,7 @@ import Hledger.Data.Amount import Hledger.Data.Dates (parsedate) -tests_Prices = tests "Prices" [ +tests_Valuation = tests "Valuation" [ tests_priceLookup ] diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index e05304ca6..bfc91430e 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -58,7 +58,6 @@ library Hledger.Data.Dates Hledger.Data.Journal Hledger.Data.Ledger - Hledger.Data.Prices Hledger.Data.Period Hledger.Data.PeriodicTransaction Hledger.Data.StringFormat @@ -68,6 +67,7 @@ library Hledger.Data.Transaction Hledger.Data.TransactionModifier Hledger.Data.Types + Hledger.Data.Valuation Hledger.Query Hledger.Read Hledger.Read.Common @@ -163,13 +163,13 @@ test-suite doctests Hledger.Data.Period Hledger.Data.PeriodicTransaction Hledger.Data.Posting - Hledger.Data.Prices Hledger.Data.RawOptions Hledger.Data.StringFormat Hledger.Data.Timeclock Hledger.Data.Transaction Hledger.Data.TransactionModifier Hledger.Data.Types + Hledger.Data.Valuation Hledger.Query Hledger.Read Hledger.Read.Common @@ -266,13 +266,13 @@ test-suite easytests Hledger.Data.Period Hledger.Data.PeriodicTransaction Hledger.Data.Posting - Hledger.Data.Prices Hledger.Data.RawOptions Hledger.Data.StringFormat Hledger.Data.Timeclock Hledger.Data.Transaction Hledger.Data.TransactionModifier Hledger.Data.Types + Hledger.Data.Valuation Hledger.Query Hledger.Read Hledger.Read.Common diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 965510a10..d0e6d2a91 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -111,7 +111,6 @@ library: - Hledger.Data.Dates - Hledger.Data.Journal - Hledger.Data.Ledger - - Hledger.Data.Prices - Hledger.Data.Period - Hledger.Data.PeriodicTransaction - Hledger.Data.StringFormat @@ -121,6 +120,7 @@ library: - Hledger.Data.Transaction - Hledger.Data.TransactionModifier - Hledger.Data.Types + - Hledger.Data.Valuation - Hledger.Query - Hledger.Read - Hledger.Read.Common