hledger 0.24 → 0.24.1
raw patch · 5 files changed
+23/−15 lines, 5 filesdep ~hledgerdep ~hledger-libdep ~utf8-stringPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hledger, hledger-lib, utf8-string
API changes (from Hackage documentation)
Files
- CHANGES +8/−1
- Hledger/Cli.hs +1/−1
- Hledger/Cli/Add.hs +4/−3
- Hledger/Cli/Options.hs +2/−2
- hledger.cabal +8/−8
CHANGES view
@@ -1,6 +1,13 @@ User-visible changes in hledger (see also hledger-lib): -0.24 (unreleased)+0.24.1 (2015/3/15)++- timelog: show hours with 2 decimal places, not 1 (#237)+- fix balance accumulation through assertions in several commodities (#195)+- fix rendering of week 52 heading in weekly reports+- allow utf8-string-1 (fpco/stackage/#426)++0.24 (2014/12/25) General: - fix redundant compilation when cabal installing the hledger packages
Hledger/Cli.hs view
@@ -132,7 +132,7 @@ ,"show dollars" ~: showAmount (usd 1) ~?= "$1.00" - ,"show hours" ~: showAmount (hrs 1) ~?= "1.0h"+ ,"show hours" ~: showAmount (hrs 1) ~?= "1.00h" ]
Hledger/Cli/Add.hs view
@@ -8,6 +8,7 @@ module Hledger.Cli.Add where +import Control.Applicative ((<*)) import Control.Exception as E import Control.Monad import Control.Monad.Trans (liftIO)@@ -178,7 +179,7 @@ where parseSmartDateAndCode refdate s = either (const Nothing) (\(d,c) -> return (fixSmartDate refdate d, c)) edc where- edc = runParser dateandcodep nullctx "" $ lowercase s+ edc = runParser (dateandcodep <* eof) nullctx "" $ lowercase s dateandcodep :: Stream [Char] m t => ParsecT [Char] JournalContext m (SmartDate, String) dateandcodep = do d <- smartdate@@ -242,7 +243,7 @@ parseAccountOrDotOrNull _ _ "." = dbg $ Just "." -- . always signals end of txn parseAccountOrDotOrNull "" True "" = dbg $ Just "" -- when there's no default and txn is balanced, "" also signals end of txn parseAccountOrDotOrNull def@(_:_) _ "" = dbg $ Just def -- when there's a default, "" means use that- parseAccountOrDotOrNull _ _ s = dbg $ either (const Nothing) validateAccount $ runParser accountnamep (jContext esJournal) "" s -- otherwise, try to parse the input as an accountname+ parseAccountOrDotOrNull _ _ s = dbg $ either (const Nothing) validateAccount $ runParser (accountnamep <* eof) (jContext esJournal) "" s -- otherwise, try to parse the input as an accountname dbg = id -- strace validateAccount s | no_new_accounts_ esOpts && not (s `elem` journalAccountNames esJournal) = Nothing | otherwise = Just s@@ -266,7 +267,7 @@ maybeRestartTransaction $ line $ green $ printf "Amount %d%s: " pnum (showDefault def) where- parseAmountAndComment = either (const Nothing) Just . runParser amountandcommentp nodefcommodityctx ""+ parseAmountAndComment = either (const Nothing) Just . runParser (amountandcommentp <* eof) nodefcommodityctx "" nodefcommodityctx = (jContext esJournal){ctxDefaultCommodityAndStyle=Nothing} amountandcommentp :: Stream [Char] m t => ParsecT [Char] JournalContext m (Amount, String) amountandcommentp = do
Hledger/Cli/Options.hs view
@@ -62,7 +62,7 @@ ) where -import Control.Applicative ((<$>))+import Control.Applicative ((<$>), (<*)) import qualified Control.Exception as C import Control.Monad (when) import Data.List@@ -451,7 +451,7 @@ widthFromOpts CliOpts{width_=Just s} = parseWidth s parseWidth :: String -> Either String OutputWidth-parseWidth s = case (runParser outputwidthp () "(unknown)") s of+parseWidth s = case (runParser (outputwidthp <* eof) () "(unknown)") s of Left e -> Left $ show e Right x -> Right x
hledger.cabal view
@@ -1,5 +1,5 @@ name: hledger-version: 0.24+version: 0.24.1 stability: stable category: Finance, Console synopsis: The main command-line interface for the hledger accounting tool.@@ -43,7 +43,7 @@ library- cpp-options: -DVERSION="0.24"+ cpp-options: -DVERSION="0.24.1" ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures ghc-options: -fno-warn-type-defaults -fno-warn-orphans default-language: Haskell2010@@ -65,7 +65,7 @@ Hledger.Cli.Register Hledger.Cli.Stats build-depends:- hledger-lib == 0.24+ hledger-lib == 0.24.1 ,base >= 4.3 && < 5 -- ,cabal-file-th ,containers@@ -98,7 +98,7 @@ ,text >= 0.11 ,tabular >= 0.2 && < 0.3 ,time- ,utf8-string >= 0.3.5 && < 0.4+ ,utf8-string >= 0.3.5 && < 1.1 ,wizards == 1.0.* if impl(ghc >= 7.4) build-depends: pretty-show >= 1.6.4@@ -108,15 +108,15 @@ main-is: hledger-cli.hs hs-source-dirs: app default-language: Haskell2010- cpp-options: -DVERSION="0.24"+ cpp-options: -DVERSION="0.24.1" ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures ghc-options: -fno-warn-type-defaults -fno-warn-orphans if flag(threaded) ghc-options: -threaded -- same as above: build-depends:- hledger-lib == 0.24- ,hledger == 0.24+ hledger-lib == 0.24.1+ ,hledger == 0.24.1 ,base >= 4.3 && < 5 ,containers ,cmdargs >= 0.10 && < 0.11@@ -140,7 +140,7 @@ ,tabular >= 0.2 && < 0.3 ,text >= 0.11 ,time- ,utf8-string >= 0.3.5 && < 0.4+ ,utf8-string >= 0.3.5 && < 1.1 ,wizards == 1.0.* if impl(ghc >= 7.4) build-depends: pretty-show >= 1.6.4