update haddock ghci examples
This commit is contained in:
		
							parent
							
								
									247563a336
								
							
						
					
					
						commit
						fddeb23397
					
				
							
								
								
									
										16
									
								
								hledger.hs
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								hledger.hs
									
									
									
									
									
								
							@ -18,17 +18,21 @@ You can use the command line:
 | 
				
			|||||||
or ghci:
 | 
					or ghci:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> $ ghci hledger
 | 
					> $ ghci hledger
 | 
				
			||||||
> > l <- ledgerfromfilewithopts [] [] "sample.ledger"
 | 
					> > l <- readLedger "sample.ledger"
 | 
				
			||||||
> > balance [] [] l
 | 
					> > length $ ledgerTransactions l
 | 
				
			||||||
>                  $-1  assets
 | 
					> 11
 | 
				
			||||||
>                   $2  expenses
 | 
					 | 
				
			||||||
>                  $-2  income
 | 
					 | 
				
			||||||
>                   $1  liabilities
 | 
					 | 
				
			||||||
> > register [] ["income","expenses"] l
 | 
					> > register [] ["income","expenses"] l
 | 
				
			||||||
> 2008/01/01 income               income:salary                   $-1          $-1
 | 
					> 2008/01/01 income               income:salary                   $-1          $-1
 | 
				
			||||||
> 2008/06/01 gift                 income:gifts                    $-1          $-2
 | 
					> 2008/06/01 gift                 income:gifts                    $-1          $-2
 | 
				
			||||||
> 2008/06/03 eat & shop           expenses:food                    $1          $-1
 | 
					> 2008/06/03 eat & shop           expenses:food                    $1          $-1
 | 
				
			||||||
>                                 expenses:supplies                $1            0
 | 
					>                                 expenses:supplies                $1            0
 | 
				
			||||||
 | 
					> > balance [Depth "1"] [] l
 | 
				
			||||||
 | 
					>                  $-1  assets
 | 
				
			||||||
 | 
					>                   $2  expenses
 | 
				
			||||||
 | 
					>                  $-2  income
 | 
				
			||||||
 | 
					>                   $1  liabilities
 | 
				
			||||||
 | 
					> > l <- myLedger
 | 
				
			||||||
 | 
					> > t <- myTimelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-}
 | 
					-}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user