move Types to Ledger/
This commit is contained in:
		
							parent
							
								
									627f78a730
								
							
						
					
					
						commit
						82e4e14e8f
					
				| @ -1,7 +1,7 @@ | |||||||
| module Account | module Account | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import AccountName | import AccountName | ||||||
| import Amount | import Amount | ||||||
| import LedgerEntry | import LedgerEntry | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| module AccountName | module AccountName | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| 
 | 
 | ||||||
| sepchar = ':' | sepchar = ':' | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -37,7 +37,7 @@ currencies can be converted to a simple amount. Arithmetic examples: | |||||||
| module Amount | module Amount | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import Currency | import Currency | ||||||
| 
 | 
 | ||||||
| tests = runTestTT $ test [ | tests = runTestTT $ test [ | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ where | |||||||
| import qualified Data.Map as Map | import qualified Data.Map as Map | ||||||
| import Data.Map ((!)) | import Data.Map ((!)) | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| 
 | 
 | ||||||
| currencies =  | currencies =  | ||||||
|     [ |     [ | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ where | |||||||
| import qualified Data.Map as Map | import qualified Data.Map as Map | ||||||
| import Data.Map ((!)) | import Data.Map ((!)) | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import Amount | import Amount | ||||||
| import Account | import Account | ||||||
| import AccountName | import AccountName | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| {-|  | {-|  | ||||||
| All the basic data types, defined here for easy re-use. See "Main". | All the basic data types, defined here for easy re-use. See "Main". | ||||||
| -} | -} | ||||||
| module Types  | module Ledger.Types  | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import qualified Data.Map as Map | import qualified Data.Map as Map | ||||||
| @ -1,7 +1,7 @@ | |||||||
| module LedgerEntry | module LedgerEntry | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import RawTransaction | import RawTransaction | ||||||
| import Amount | import Amount | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ This module makes it easier to import all the hledger "models", | |||||||
| the main data types and their "methods". | the main data types and their "methods". | ||||||
| -} | -} | ||||||
| module Models ( | module Models ( | ||||||
|                module Types, |                module Ledger.Types, | ||||||
|                module Currency, |                module Currency, | ||||||
|                module Amount, |                module Amount, | ||||||
|                module AccountName, |                module AccountName, | ||||||
| @ -18,7 +18,7 @@ module Models ( | |||||||
| where | where | ||||||
| import qualified Data.Map as Map | import qualified Data.Map as Map | ||||||
| 
 | 
 | ||||||
| import Types | import Ledger.Types | ||||||
| import Currency | import Currency | ||||||
| import Amount | import Amount | ||||||
| import AccountName | import AccountName | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ import System.Environment (getEnv) | |||||||
| import Data.Maybe (fromMaybe) | import Data.Maybe (fromMaybe) | ||||||
|      |      | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| usagehdr       = "Usage: hledger [OPTIONS] "++commands++" [ACCTPATTERNS] [-- DESCPATTERNS]\nOptions:" | usagehdr       = "Usage: hledger [OPTIONS] "++commands++" [ACCTPATTERNS] [-- DESCPATTERNS]\nOptions:" | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ where | |||||||
| import qualified Data.Map as Map | import qualified Data.Map as Map | ||||||
| 
 | 
 | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import AccountName | import AccountName | ||||||
| import LedgerEntry | import LedgerEntry | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| module RawTransaction | module RawTransaction | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import AccountName | import AccountName | ||||||
| import Amount | import Amount | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| module TimeLog | module TimeLog | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import Currency | import Currency | ||||||
| import Amount | import Amount | ||||||
| import RawTransaction | import RawTransaction | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| module Transaction | module Transaction | ||||||
| where | where | ||||||
| import Ledger.Utils | import Ledger.Utils | ||||||
| import Types | import Ledger.Types | ||||||
| import AccountName | import AccountName | ||||||
| import LedgerEntry | import LedgerEntry | ||||||
| import RawTransaction | import RawTransaction | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ implementation of ledger. | |||||||
| 
 | 
 | ||||||
| Code organization: the early code defined each major type and their | Code organization: the early code defined each major type and their | ||||||
| associated functions in a module. This was too restrictive, so now most | 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 | used to group functions related to each type.  Here is the approximate | ||||||
| import hierarchy: | import hierarchy: | ||||||
| 
 | 
 | ||||||
| @ -33,7 +33,7 @@ hledger ("Main") | |||||||
|        "AccountName" |        "AccountName" | ||||||
|        "Amount" |        "Amount" | ||||||
|         "Currency" |         "Currency" | ||||||
|          "Types" |          "Ledger.Types" | ||||||
|           "Ledger.Utils" |           "Ledger.Utils" | ||||||
| @ | @ | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user