move Types to Ledger/
This commit is contained in:
		
							parent
							
								
									627f78a730
								
							
						
					
					
						commit
						82e4e14e8f
					
				| @ -1,7 +1,7 @@ | ||||
| module Account | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import AccountName | ||||
| import Amount | ||||
| import LedgerEntry | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| module AccountName | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| 
 | ||||
| sepchar = ':' | ||||
| 
 | ||||
|  | ||||
| @ -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 [ | ||||
|  | ||||
| @ -3,7 +3,7 @@ where | ||||
| import qualified Data.Map as Map | ||||
| import Data.Map ((!)) | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| 
 | ||||
| currencies =  | ||||
|     [ | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -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 | ||||
| @ -1,7 +1,7 @@ | ||||
| module LedgerEntry | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import RawTransaction | ||||
| import Amount | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -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:" | ||||
|  | ||||
| @ -3,7 +3,7 @@ where | ||||
| import qualified Data.Map as Map | ||||
| 
 | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import AccountName | ||||
| import LedgerEntry | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| module RawTransaction | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import AccountName | ||||
| import Amount | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| module TimeLog | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import Currency | ||||
| import Amount | ||||
| import RawTransaction | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| module Transaction | ||||
| where | ||||
| import Ledger.Utils | ||||
| import Types | ||||
| import Ledger.Types | ||||
| import AccountName | ||||
| import LedgerEntry | ||||
| import RawTransaction | ||||
|  | ||||
| @ -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" | ||||
| @ | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user