diff --git a/Account.hs b/Account.hs index d6668b1e6..ba54fd335 100644 --- a/Account.hs +++ b/Account.hs @@ -1,7 +1,7 @@ module Account where import Ledger.Utils -import Types +import Ledger.Types import AccountName import Amount import LedgerEntry diff --git a/AccountName.hs b/AccountName.hs index 0c58555e1..2061f38e9 100644 --- a/AccountName.hs +++ b/AccountName.hs @@ -1,7 +1,7 @@ module AccountName where import Ledger.Utils -import Types +import Ledger.Types sepchar = ':' diff --git a/Amount.hs b/Amount.hs index 84694ff1e..275f8e6b5 100644 --- a/Amount.hs +++ b/Amount.hs @@ -37,7 +37,7 @@ currencies can be converted to a simple amount. Arithmetic examples: module Amount where import Ledger.Utils -import Types +import Ledger.Types import Currency tests = runTestTT $ test [ diff --git a/Currency.hs b/Currency.hs index e1ecec8a6..424c3bf09 100644 --- a/Currency.hs +++ b/Currency.hs @@ -3,7 +3,7 @@ where import qualified Data.Map as Map import Data.Map ((!)) import Ledger.Utils -import Types +import Ledger.Types currencies = [ diff --git a/Ledger.hs b/Ledger.hs index c1dfb996f..0a6944f32 100644 --- a/Ledger.hs +++ b/Ledger.hs @@ -3,7 +3,7 @@ where import qualified Data.Map as Map import Data.Map ((!)) import Ledger.Utils -import Types +import Ledger.Types import Amount import Account import AccountName diff --git a/Types.hs b/Ledger/Types.hs similarity index 99% rename from Types.hs rename to Ledger/Types.hs index 0ab215395..2f2ed103b 100644 --- a/Types.hs +++ b/Ledger/Types.hs @@ -1,7 +1,7 @@ {-| All the basic data types, defined here for easy re-use. See "Main". -} -module Types +module Ledger.Types where import Ledger.Utils import qualified Data.Map as Map diff --git a/LedgerEntry.hs b/LedgerEntry.hs index 508a4a714..73c06696d 100644 --- a/LedgerEntry.hs +++ b/LedgerEntry.hs @@ -1,7 +1,7 @@ module LedgerEntry where import Ledger.Utils -import Types +import Ledger.Types import RawTransaction import Amount diff --git a/Models.hs b/Models.hs index 4d1943f41..beb18a6df 100644 --- a/Models.hs +++ b/Models.hs @@ -3,7 +3,7 @@ This module makes it easier to import all the hledger "models", the main data types and their "methods". -} module Models ( - module Types, + module Ledger.Types, module Currency, module Amount, module AccountName, @@ -18,7 +18,7 @@ module Models ( where import qualified Data.Map as Map -import Types +import Ledger.Types import Currency import Amount import AccountName diff --git a/Options.hs b/Options.hs index ef5fb18d1..41b5efda7 100644 --- a/Options.hs +++ b/Options.hs @@ -6,7 +6,7 @@ import System.Environment (getEnv) import Data.Maybe (fromMaybe) import Ledger.Utils -import Types +import Ledger.Types usagehdr = "Usage: hledger [OPTIONS] "++commands++" [ACCTPATTERNS] [-- DESCPATTERNS]\nOptions:" diff --git a/RawLedger.hs b/RawLedger.hs index 60a3e09d9..2ce82d7ba 100644 --- a/RawLedger.hs +++ b/RawLedger.hs @@ -3,7 +3,7 @@ where import qualified Data.Map as Map import Ledger.Utils -import Types +import Ledger.Types import AccountName import LedgerEntry diff --git a/RawTransaction.hs b/RawTransaction.hs index a4f58cc46..12a657582 100644 --- a/RawTransaction.hs +++ b/RawTransaction.hs @@ -1,7 +1,7 @@ module RawTransaction where import Ledger.Utils -import Types +import Ledger.Types import AccountName import Amount diff --git a/TimeLog.hs b/TimeLog.hs index fa3fa7a40..d63c67418 100644 --- a/TimeLog.hs +++ b/TimeLog.hs @@ -1,7 +1,7 @@ module TimeLog where import Ledger.Utils -import Types +import Ledger.Types import Currency import Amount import RawTransaction diff --git a/Transaction.hs b/Transaction.hs index 04da944fc..e3e4ce241 100644 --- a/Transaction.hs +++ b/Transaction.hs @@ -1,7 +1,7 @@ module Transaction where import Ledger.Utils -import Types +import Ledger.Types import AccountName import LedgerEntry import RawTransaction diff --git a/hledger.hs b/hledger.hs index a2ceb4faa..e3f1da394 100644 --- a/hledger.hs +++ b/hledger.hs @@ -13,7 +13,7 @@ implementation of ledger. Code organization: the early code defined each major type and their associated functions in a module. This was too restrictive, so now most -types are defined in "Types" at the bottom. The original modules are still +types are defined in "Ledger.Types" at the bottom. The original modules are still used to group functions related to each type. Here is the approximate import hierarchy: @@ -33,7 +33,7 @@ hledger ("Main") "AccountName" "Amount" "Currency" - "Types" + "Ledger.Types" "Ledger.Utils" @