diff --git a/extra/hledger-equity.hs b/extra/hledger-equity.hs index 43ca0ffae..daa868bc8 100755 --- a/extra/hledger-equity.hs +++ b/extra/hledger-equity.hs @@ -37,7 +37,7 @@ main = do withJournalDo opts $ \CliOpts{reportopts_=ropts} j -> do today <- getCurrentDay - let ropts_ = ropts{flat_=True} + let ropts_ = ropts{accountlistmode_=ALFlat} q = queryFromOpts today ropts_ (acctbals,_) = balanceReport ropts_ q j balancingamt = negate $ sum $ map (\((_,_,_),b) -> b) acctbals diff --git a/extra/hledger-rewrite.hs b/extra/hledger-rewrite.hs index 1f9237e1f..869a67374 100755 --- a/extra/hledger-rewrite.hs +++ b/extra/hledger-rewrite.hs @@ -1,5 +1,5 @@ #!/usr/bin/env runhaskell -{-# LANGUAGE CPP #-} +-- {-# LANGUAGE CPP #-} {-| hledger-rewrite [PATTERNS] --add-posting "ACCT AMTEXPR" ... @@ -23,9 +23,9 @@ Tested-with: hledger HEAD ~ 2014/2/4 -- hledger lib, cli and cmdargs utils import Hledger.Cli -- more utils for parsing -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative.Compat ((<*)) -#endif +-- #if !MIN_VERSION_base(4,8,0) +-- import Control.Applicative.Compat ((<*)) +-- #endif import Text.Parsec @@ -70,7 +70,7 @@ amountexprp = amountExprRenderer :: Query -> AmountExpr -> (Transaction -> MixedAmount) amountExprRenderer q aex = case aex of - AmountLiteral s -> either parseerror (const . mixed) $ runParser (amountp <* eof) nullctx "" s + AmountLiteral s -> mamountp' s -- either parseerror (const . mixed) $ runParser (amountp <* eof) nullctx "" s AmountMultiplier n -> (`divideMixedAmount` (1 / n)) . (`firstAmountMatching` q) where firstAmountMatching :: Transaction -> Query -> MixedAmount