From 96b4f0be4f1ac2d3d25dcb524c9ddd2c83b4950e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 19 Mar 2020 10:10:55 -0700 Subject: [PATCH] require newer Decimal, math-functions, fixing inconsistent rounding Decimal 0.5.1+ changed to banker's rounding (round to nearest even number), and math-functions 0.3.3.0 (used by roi) fixed various precision-related issues. Now we require the latest versions of these. This was causing some functional test failures when building with old GHCs/snapshots. --- hledger-lib/hledger-lib.cabal | 8 ++++---- hledger-lib/package.yaml | 2 +- hledger-web/hledger-web.cabal | 4 ++-- hledger-web/package.yaml | 2 +- hledger/hledger.cabal | 18 +++++++++--------- hledger/package.yaml | 4 ++-- stack-8.0.yaml | 2 ++ stack-8.2.yaml | 1 + stack-8.4.yaml | 1 + 9 files changed, 23 insertions(+), 19 deletions(-) diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index aaa57635d..e631ab28a 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 15de1698b07fbd3107f0c9b3e22f08d05d0dbc6938dd40d5b743d5591ac4c0f5 +-- hash: 01d6a6a7e96f08f55b4d21dcd593b3de2ad7dd0334e528eebb5bcc2f270f1bba name: hledger-lib version: 1.17.99 @@ -106,7 +106,7 @@ library ./. ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans build-depends: - Decimal + Decimal >=0.5.1 , Glob >=0.9 , aeson , ansi-terminal >=0.6.2.3 @@ -157,7 +157,7 @@ test-suite doctest test ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans build-depends: - Decimal + Decimal >=0.5.1 , Glob >=0.7 , aeson , ansi-terminal >=0.6.2.3 @@ -211,7 +211,7 @@ test-suite unittest test ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans build-depends: - Decimal + Decimal >=0.5.1 , Glob >=0.9 , aeson , ansi-terminal >=0.6.2.3 diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 2e13bb1a3..4ba590bbf 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -54,7 +54,7 @@ dependencies: - cassava - cassava-megaparsec - data-default >=0.5 -- Decimal +- Decimal >=0.5.1 - deepseq - directory - fgl >=5.5.4.0 diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index d1d42d750..abe16fb8d 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 05a5380672afe392399748df8f24e4d4e1f87877f0204ad892756620b3640c63 +-- hash: ec505e9faa6b33a81e754a96291ea152d9d7a26b1f2862b97617220438ac3a60 name: hledger-web version: 1.17.99 @@ -152,7 +152,7 @@ library ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints cpp-options: -DVERSION="1.17.99" build-depends: - Decimal + Decimal >=0.5.1 , aeson , base >=4.9 && <4.15 , blaze-html diff --git a/hledger-web/package.yaml b/hledger-web/package.yaml index bb983a946..8a0a79789 100644 --- a/hledger-web/package.yaml +++ b/hledger-web/package.yaml @@ -110,7 +110,7 @@ library: - conduit-extra >=1.1 - containers - data-default - - Decimal + - Decimal >=0.5.1 - directory - extra >=1.6.3 - filepath diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index 0ca9204f6..5b559c094 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 2c855b1eb6a4e22495b7f115daa9c8f47eb3279bab634133dd4e597a722ee1cb +-- hash: 0d3dd28d19c221724a5d9497497cef89fa080b4f46c4f46c7d87ce372513884b name: hledger version: 1.17.99 @@ -146,7 +146,7 @@ library 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.17.99" build-depends: - Decimal + Decimal >=0.5.1 , Diff , aeson , ansi-terminal >=0.6.2.3 @@ -163,7 +163,7 @@ library , haskeline >=0.6 , hledger-lib >=1.17.99 && <1.18 , lucid - , math-functions >=0.2.0.0 + , math-functions >=0.3.3.0 , megaparsec >=7.0.0 && <8.1 , mtl >=2.2.1 , old-time @@ -199,7 +199,7 @@ executable 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.17.99" build-depends: - Decimal + Decimal >=0.5.1 , aeson , ansi-terminal >=0.6.2.3 , base >=4.9 && <4.15 @@ -214,7 +214,7 @@ executable hledger , haskeline >=0.6 , hledger , hledger-lib >=1.17.99 && <1.18 - , math-functions >=0.2.0.0 + , math-functions >=0.3.3.0 , megaparsec >=7.0.0 && <8.1 , mtl >=2.2.1 , old-time @@ -251,7 +251,7 @@ test-suite unittest 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.17.99" build-depends: - Decimal + Decimal >=0.5.1 , aeson , ansi-terminal >=0.6.2.3 , base >=4.9 && <4.15 @@ -266,7 +266,7 @@ test-suite unittest , haskeline >=0.6 , hledger , hledger-lib >=1.17.99 && <1.18 - , math-functions >=0.2.0.0 + , math-functions >=0.3.3.0 , megaparsec >=7.0.0 && <8.1 , mtl >=2.2.1 , old-time @@ -300,7 +300,7 @@ benchmark bench bench 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 build-depends: - Decimal + Decimal >=0.5.1 , aeson , ansi-terminal >=0.6.2.3 , base >=4.9 && <4.15 @@ -317,7 +317,7 @@ benchmark bench , hledger , hledger-lib >=1.17.99 && <1.18 , html - , math-functions >=0.2.0.0 + , math-functions >=0.3.3.0 , megaparsec >=7.0.0 && <8.1 , mtl >=2.2.1 , old-time diff --git a/hledger/package.yaml b/hledger/package.yaml index 2baedd06a..ece285519 100644 --- a/hledger/package.yaml +++ b/hledger/package.yaml @@ -114,7 +114,7 @@ dependencies: - cmdargs >=0.10 - containers - data-default >=0.5 -- Decimal +- Decimal >=0.5.1 - directory - extra >=1.6.3 - filepath @@ -129,7 +129,7 @@ dependencies: - safe >=0.2 - shakespeare >=2.0.2.2 - split >=0.1 -- math-functions >=0.2.0.0 +- math-functions >=0.3.3.0 - tabular >=0.2 - tasty >=1.2.3 - temporary diff --git a/stack-8.0.yaml b/stack-8.0.yaml index 56e2f554d..ecc468834 100644 --- a/stack-8.0.yaml +++ b/stack-8.0.yaml @@ -67,3 +67,5 @@ extra-deps: - wcwidth-0.0.2 - ansi-wl-pprint-0.6.9 - optparse-applicative-0.15.1.0 +- Decimal-0.5.1 +- math-functions-0.3.3.0 diff --git a/stack-8.2.yaml b/stack-8.2.yaml index 0642821b8..d45f47f97 100644 --- a/stack-8.2.yaml +++ b/stack-8.2.yaml @@ -44,3 +44,4 @@ extra-deps: - wai-handler-launch-3.0.3.1 - streaming-commons-0.2.1.2 - network-2.7.0.0 +- math-functions-0.3.3.0 diff --git a/stack-8.4.yaml b/stack-8.4.yaml index f5b147e9b..54e57fa84 100644 --- a/stack-8.4.yaml +++ b/stack-8.4.yaml @@ -26,3 +26,4 @@ extra-deps: - wai-handler-launch-3.0.3.1 - streaming-commons-0.2.1.2 - network-2.7.0.0 +- math-functions-0.3.3.0