From 627f78a73055bda070a07630c0bb08a661c4a279 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 3 Oct 2008 00:05:16 +0000 Subject: [PATCH] first step towards a library, move Utils to Ledger.Utils --- Account.hs | 2 +- AccountName.hs | 2 +- Amount.hs | 2 +- Currency.hs | 2 +- Ledger.hs | 2 +- Utils.hs => Ledger/Utils.hs | 4 ++-- LedgerEntry.hs | 2 +- Options.hs | 2 +- Parse.hs | 2 +- RawLedger.hs | 2 +- RawTransaction.hs | 2 +- Tests.hs | 2 +- TimeLog.hs | 2 +- Transaction.hs | 2 +- Types.hs | 2 +- hledger.hs | 4 ++-- 16 files changed, 18 insertions(+), 18 deletions(-) rename Utils.hs => Ledger/Utils.hs (96%) diff --git a/Account.hs b/Account.hs index c65d9d288..d6668b1e6 100644 --- a/Account.hs +++ b/Account.hs @@ -1,6 +1,6 @@ module Account where -import Utils +import Ledger.Utils import Types import AccountName import Amount diff --git a/AccountName.hs b/AccountName.hs index c45f96b30..0c58555e1 100644 --- a/AccountName.hs +++ b/AccountName.hs @@ -1,6 +1,6 @@ module AccountName where -import Utils +import Ledger.Utils import Types sepchar = ':' diff --git a/Amount.hs b/Amount.hs index 52f05f39a..84694ff1e 100644 --- a/Amount.hs +++ b/Amount.hs @@ -36,7 +36,7 @@ currencies can be converted to a simple amount. Arithmetic examples: module Amount where -import Utils +import Ledger.Utils import Types import Currency diff --git a/Currency.hs b/Currency.hs index f17df0af2..e1ecec8a6 100644 --- a/Currency.hs +++ b/Currency.hs @@ -2,7 +2,7 @@ module Currency where import qualified Data.Map as Map import Data.Map ((!)) -import Utils +import Ledger.Utils import Types currencies = diff --git a/Ledger.hs b/Ledger.hs index f50d8780c..c1dfb996f 100644 --- a/Ledger.hs +++ b/Ledger.hs @@ -2,7 +2,7 @@ module Ledger where import qualified Data.Map as Map import Data.Map ((!)) -import Utils +import Ledger.Utils import Types import Amount import Account diff --git a/Utils.hs b/Ledger/Utils.hs similarity index 96% rename from Utils.hs rename to Ledger/Utils.hs index 385e9cb1f..527ee6f63 100644 --- a/Utils.hs +++ b/Ledger/Utils.hs @@ -1,6 +1,6 @@ -- standard imports and utilities -module Utils ( - module Utils, +module Ledger.Utils ( + module Ledger.Utils, module Char, module Data.List, module Data.Tree, diff --git a/LedgerEntry.hs b/LedgerEntry.hs index c0bd6361d..508a4a714 100644 --- a/LedgerEntry.hs +++ b/LedgerEntry.hs @@ -1,6 +1,6 @@ module LedgerEntry where -import Utils +import Ledger.Utils import Types import RawTransaction import Amount diff --git a/Options.hs b/Options.hs index 62a94a137..ef5fb18d1 100644 --- a/Options.hs +++ b/Options.hs @@ -5,7 +5,7 @@ import System.Directory import System.Environment (getEnv) import Data.Maybe (fromMaybe) -import Utils +import Ledger.Utils import Types diff --git a/Parse.hs b/Parse.hs index 36c815c0a..91dcafbfa 100644 --- a/Parse.hs +++ b/Parse.hs @@ -109,7 +109,7 @@ import Text.ParserCombinators.Parsec.Language import qualified Text.ParserCombinators.Parsec.Token as P import System.IO -import Utils +import Ledger.Utils import Models import Options diff --git a/RawLedger.hs b/RawLedger.hs index 665cc22d5..60a3e09d9 100644 --- a/RawLedger.hs +++ b/RawLedger.hs @@ -2,7 +2,7 @@ module RawLedger where import qualified Data.Map as Map -import Utils +import Ledger.Utils import Types import AccountName import LedgerEntry diff --git a/RawTransaction.hs b/RawTransaction.hs index 585fead49..a4f58cc46 100644 --- a/RawTransaction.hs +++ b/RawTransaction.hs @@ -1,6 +1,6 @@ module RawTransaction where -import Utils +import Ledger.Utils import Types import AccountName import Amount diff --git a/Tests.hs b/Tests.hs index e945c156e..a75171eee 100644 --- a/Tests.hs +++ b/Tests.hs @@ -6,7 +6,7 @@ import Text.ParserCombinators.Parsec import Options import Models import Parse -import Utils +import Ledger.Utils -- utils diff --git a/TimeLog.hs b/TimeLog.hs index ce3f91c4e..fa3fa7a40 100644 --- a/TimeLog.hs +++ b/TimeLog.hs @@ -1,6 +1,6 @@ module TimeLog where -import Utils +import Ledger.Utils import Types import Currency import Amount diff --git a/Transaction.hs b/Transaction.hs index a3105bd81..04da944fc 100644 --- a/Transaction.hs +++ b/Transaction.hs @@ -1,6 +1,6 @@ module Transaction where -import Utils +import Ledger.Utils import Types import AccountName import LedgerEntry diff --git a/Types.hs b/Types.hs index c7989be94..0ab215395 100644 --- a/Types.hs +++ b/Types.hs @@ -3,7 +3,7 @@ All the basic data types, defined here for easy re-use. See "Main". -} module Types where -import Utils +import Ledger.Utils import qualified Data.Map as Map -- | a date diff --git a/hledger.hs b/hledger.hs index b51ced149..a2ceb4faa 100644 --- a/hledger.hs +++ b/hledger.hs @@ -34,7 +34,7 @@ hledger ("Main") "Amount" "Currency" "Types" - "Utils" + "Ledger.Utils" @ This module includes some helpers for querying your ledger in ghci. Examples: @@ -66,7 +66,7 @@ import Options import Models import Parse (parseLedgerAndDo, parseLedgerFile) import Tests (hunit, quickcheck) -import Utils hiding (test) +import Ledger.Utils hiding (test) main :: IO ()