misc support
This commit is contained in:
		
							parent
							
								
									bf89f7ac7a
								
							
						
					
					
						commit
						6bc4f5f72d
					
				| @ -181,3 +181,5 @@ interestingAccountsFrom = | ||||
|       hasbalance = (/= 0) . abalance | ||||
|       hastxns = (> 0) . length . atransactions | ||||
| 
 | ||||
| ledgerAccountTree :: Ledger -> Tree Account | ||||
| ledgerAccountTree l = addDataToAccountNameTree l (ledgerAccountNameTree l) | ||||
|  | ||||
| @ -34,8 +34,8 @@ ledgerTransactionsMatching (acctregexps,descregexps) l = | ||||
|     (concat [filter (matchTransactionDescription r) ts | r <- descregexps]) | ||||
|     where ts = ledgerTransactions l | ||||
| 
 | ||||
| ledgerTransactionsInAccount :: Ledger -> AccountName -> [EntryTransaction] | ||||
| ledgerTransactionsInAccount l a = ledgerTransactionsMatching (["^" ++ a ++ "$"], []) l | ||||
| ledgerAccountTransactions :: Ledger -> AccountName -> [EntryTransaction] | ||||
| ledgerAccountTransactions l a = ledgerTransactionsMatching (["^" ++ a ++ "$"], []) l | ||||
|             | ||||
| accountNamesFromTransactions :: [EntryTransaction] -> [AccountName] | ||||
| accountNamesFromTransactions ts = nub $ map account ts | ||||
|  | ||||
							
								
								
									
										1
									
								
								Utils.hs
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Utils.hs
									
									
									
									
									
								
							| @ -57,3 +57,4 @@ treeany f t = (f $ root t) || (any (treeany f) $ branches t) | ||||
| -- treedrop -- remove the leaves which do fulfill predicate.  | ||||
| -- treedropall -- do this repeatedly. | ||||
| 
 | ||||
| strace a = trace (show a) a | ||||
| @ -1,10 +1,10 @@ | ||||
| #!/usr/bin/env runhaskell | ||||
| {- | ||||
| hledger - ledger-compatible money management tool (& haskell study) | ||||
| GPLv3, (c) Simon Michael & contributors | ||||
| A port of John Wiegley's ledger at http://newartisans.com/ledger.html | ||||
| 
 | ||||
| The module/model hierarchy is roughly like this; each layer can only | ||||
| reference things below it: | ||||
| Here is a rough overview of the module/model hierarchy: | ||||
| 
 | ||||
| hledger | ||||
|  Options | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user