hledger 1.12 → 1.12.1
raw patch · 3 files changed
+24/−12 lines, 3 filesdep +math-functionsdep −statisticsPVP ok
version bump matches the API change (PVP)
Dependencies added: math-functions
Dependencies removed: statistics
API changes (from Hackage documentation)
Files
- CHANGES +6/−0
- Hledger/Cli/Commands/Roi.hs +9/−3
- hledger.cabal +9/−9
CHANGES view
@@ -1,6 +1,12 @@ User-visible changes in the hledger command line tool (and hledger-lib). +# 1.12.1 (2018/12/03)++* roi: use math-functions lib instead of statistics,+ be more stackage nightly compatible ++ # 1.12 (2018/12/02) * install script: ensure a new-enough version of stack; more informative output
Hledger/Cli/Commands/Roi.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE QuasiQuotes,ParallelListComp #-}+{-# LANGUAGE QuasiQuotes,ParallelListComp,CPP #-} {-| The @roi@ command prints internal rate of return and time-weighted rate of return for and investment.@@ -17,7 +17,7 @@ import Data.Function (on) import Data.List import Data.Ord-import Statistics.Math.RootFinding+import Numeric.RootFinding import Data.Decimal import Data.String.Here import System.Console.CmdArgs.Explicit as CmdArgs@@ -216,7 +216,13 @@ (map ((:[]) . show) amounts)) -- 0% is always a solution, so require at least something here- case ridders 0.00001 (0.000000000001,10000) (interestSum spanEnd totalCF) of+ case ridders +#if MIN_VERSION_math_functions(0,3,0)+ (RiddersParam 100 (AbsTol 0.00001)) +#else+ 0.00001+#endif+ (0.000000000001,10000) (interestSum spanEnd totalCF) of Root rate -> return ((rate-1)*100) NotBracketed -> error "Error: No solution -- not bracketed." SearchFailed -> error "Error: Failed to find solution."
hledger.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 459ec44c2ae4fd1a0f7e0f8001c3efae2a39ff8b1ef53baa0a510b0674e98c2c+-- hash: 269994bfba5ad36962478f05df1bf958a94778ec5b36db499d768b64aa3e411a name: hledger-version: 1.12+version: 1.12.1 synopsis: Command-line interface for the hledger accounting tool description: This is hledger's command-line interface. Its basic function is to read a plain text file describing@@ -112,7 +112,7 @@ other-modules: Paths_hledger ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path- cpp-options: -DVERSION="1.12"+ cpp-options: -DVERSION="1.12.1" build-depends: Decimal , Diff@@ -132,6 +132,7 @@ , here , hledger-lib >=1.12 && <1.13 , lucid+ , math-functions >=0.2.0.0 , megaparsec >=7.0.0 && <8 , mtl , mtl-compat@@ -143,7 +144,6 @@ , safe >=0.2 , shakespeare >=2.0.2.2 , split >=0.1- , statistics <=0.15 , tabular >=0.2 , temporary , text >=0.11@@ -165,7 +165,7 @@ hs-source-dirs: app ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path- cpp-options: -DVERSION="1.12"+ cpp-options: -DVERSION="1.12.1" build-depends: Decimal , ansi-terminal >=0.6.2.3@@ -183,6 +183,7 @@ , here , hledger , hledger-lib >=1.12 && <1.13+ , math-functions >=0.2.0.0 , megaparsec >=7.0.0 && <8 , mtl , mtl-compat@@ -194,7 +195,6 @@ , safe >=0.2 , shakespeare >=2.0.2.2 , split >=0.1- , statistics <=0.15 , tabular >=0.2 , temporary , text >=0.11@@ -219,7 +219,7 @@ hs-source-dirs: test ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path- cpp-options: -DVERSION="1.12"+ cpp-options: -DVERSION="1.12.1" build-depends: Decimal , ansi-terminal >=0.6.2.3@@ -237,6 +237,7 @@ , here , hledger , hledger-lib >=1.12 && <1.13+ , math-functions >=0.2.0.0 , megaparsec >=7.0.0 && <8 , mtl , mtl-compat@@ -248,7 +249,6 @@ , safe >=0.2 , shakespeare >=2.0.2.2 , split >=0.1- , statistics <=0.15 , tabular >=0.2 , temporary , test-framework@@ -292,6 +292,7 @@ , hledger , hledger-lib >=1.12 && <1.13 , html+ , math-functions >=0.2.0.0 , megaparsec >=7.0.0 && <8 , mtl , mtl-compat@@ -303,7 +304,6 @@ , safe >=0.2 , shakespeare >=2.0.2.2 , split >=0.1- , statistics <=0.15 , tabular >=0.2 , temporary , text >=0.11