From d795c0bac8ca5376661982a7940cd1d6d7a97777 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 28 Jun 2008 04:44:56 +0000 Subject: [PATCH] update ghci examples --- hledger.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hledger.hs b/hledger.hs index adef14be9..4d3e07458 100644 --- a/hledger.hs +++ b/hledger.hs @@ -69,16 +69,16 @@ balance opts pats = do otherwise -> 9999 {- -interactive testing: +interactive testing in ghci: -*Main> p <- ledgerFilePath [File "./test.dat"] >>= parseLedgerFile -*Main> let r = either (\_ -> LedgerFile [] [] []) id p -*Main> let l = cacheLedger r -*Main> let ant = accountnametree l -*Main> let at = accounts l -*Main> putStr $ drawTree $ treemap show $ ant -*Main> putStr $ showLedgerAccounts l [] False 1 -*Main> :m +Tests -*Main Tests> l7 +p <- ledgerFilePath [File "./test.ledger"] >>= parseLedgerFile +let r = either (\_ -> LedgerFile [] [] [] "") id p +let l = cacheLedger (argpats [] []) r +let ant = accountnametree l +let at = accounts l +putStr $ drawTree $ treemap show $ ant +putStr $ showLedgerAccounts l 1 +:m +Tests +l7 -}