[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
186/290: gnu: ghc-diff: Patch to work with newer QuickCheck.
From: |
guix-commits |
Subject: |
186/290: gnu: ghc-diff: Patch to work with newer QuickCheck. |
Date: |
Wed, 6 Nov 2019 08:23:01 -0500 (EST) |
samplet pushed a commit to branch wip-haskell-updates
in repository guix.
commit 7f0d6dee73f2b4cb78d4199c03eace23886d1210
Author: Timothy Sample <address@hidden>
Date: Fri Nov 1 21:56:40 2019 -0400
gnu: ghc-diff: Patch to work with newer QuickCheck.
* gnu/packages/patches/ghc-diff-swap-cover-args.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/haskell-xyz.scm (ghc-diff): Use it.
---
gnu/local.mk | 1 +
gnu/packages/haskell-xyz.scm | 1 +
gnu/packages/patches/ghc-diff-swap-cover-args.patch | 20 ++++++++++++++++++++
3 files changed, 22 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 96b570a..e82200c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -875,6 +875,7 @@ dist_patch_DATA =
\
%D%/packages/patches/gd-freetype-test-failure.patch \
%D%/packages/patches/geoclue-config.patch \
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
+ %D%/packages/patches/ghc-diff-swap-cover-args.patch \
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch
\
%D%/packages/patches/ghc-haddock-library-unbundle.patch \
%D%/packages/patches/ghostscript-no-header-id.patch \
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 0536d3b..a78a4d9 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -2605,6 +2605,7 @@ and parsers with useful semantics.")
(method url-fetch)
(uri (string-append "https://hackage.haskell.org/package/"
"Diff/Diff-" version ".tar.gz"))
+ (patches (search-patches "ghc-diff-swap-cover-args.patch"))
(sha256
(base32
"0bqcdvhxx8dmqc3793m6axg813wv9ldz2j37f1wygbbrbbndmdvp"))))
diff --git a/gnu/packages/patches/ghc-diff-swap-cover-args.patch
b/gnu/packages/patches/ghc-diff-swap-cover-args.patch
new file mode 100644
index 0000000..724416f
--- /dev/null
+++ b/gnu/packages/patches/ghc-diff-swap-cover-args.patch
@@ -0,0 +1,20 @@
+The QuickCheck library swapped the order of the arguments of the 'cover'
+function in version 2.12. Version 0.3.4 of the Diff library still uses
+the old argument order. Swapping the argument order makes Diff work
+with newer versions of QuickCheck.
+
+See <https://github.com/commercialhaskell/stackage/issues/4289> for the
+upstream bug report.
+
+diff -ruN a/test/Test.hs b/test/Test.hs
+--- a/test/Test.hs 2016-04-23 01:21:45.000000000 -0400
++++ b/test/Test.hs 2019-11-01 19:13:04.590770903 -0400
+@@ -134,7 +134,7 @@
+ prop_ppDiffR (DiffInput le ri) =
+ let haskDiff=ppDiff $ getGroupedDiff le ri
+ utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri))
+- in cover (haskDiff == utilDiff) 90 "exact match" $
++ in cover 90 (haskDiff == utilDiff) "exact match" $
+ classify (haskDiff == utilDiff) "exact match"
+ (div ((length haskDiff)*100) (length utilDiff) < 110)
-- less than 10% bigger
+ where
- 189/290: gnu: ghc-shakespeare: Update to 2.0.22., (continued)
- 189/290: gnu: ghc-shakespeare: Update to 2.0.22., guix-commits, 2019/11/06
- 193/290: gnu: ghc-semigroupoids: Update to 5.3.3., guix-commits, 2019/11/06
- 192/290: gnu: ghc-io-streams-haproxy: Update to 1.0.1.0., guix-commits, 2019/11/06
- 195/290: gnu: ghc-openssl-streams: Update to 1.2.2.0., guix-commits, 2019/11/06
- 197/290: gnu: ghc-inline-c-cpp: Update to 0.3.0.3., guix-commits, 2019/11/06
- 202/290: gnu: ghc-invariant: Update to 0.5.3., guix-commits, 2019/11/06
- 205/290: gnu: Add ghc-network-byte-order., guix-commits, 2019/11/06
- 208/290: gnu: Add ghc-tasty-hedgehog., guix-commits, 2019/11/06
- 209/290: gnu: ghc-bsb-http-chunked: Update to 0.0.0.4., guix-commits, 2019/11/06
- 213/290: gnu: ghc-path-io: Update to 1.4.2., guix-commits, 2019/11/06
- 186/290: gnu: ghc-diff: Patch to work with newer QuickCheck.,
guix-commits <=
- 194/290: gnu: ghc-http-api-data: Update to 0.4.1., guix-commits, 2019/11/06
- 201/290: gnu: ghc-statistics: Update to 0.15.1.1., guix-commits, 2019/11/06
- 199/290: gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6., guix-commits, 2019/11/06
- 203/290: gnu: ghc-vault: Update to 0.3.1.3., guix-commits, 2019/11/06
- 206/290: gnu: ghc-http2: Update to 1.6.5., guix-commits, 2019/11/06
- 210/290: gnu: Add ghc-retry., guix-commits, 2019/11/06
- 225/290: gnu: ghc-wai-extra: Update to 3.0.28., guix-commits, 2019/11/06
- 221/290: gnu: ghc-cryptohash-md5: Update Cabal file to r4., guix-commits, 2019/11/06
- 235/290: gnu: ghc-monad-logger: Update to 0.3.30., guix-commits, 2019/11/06
- 214/290: gnu: ghc-free: Update to 5.1.2., guix-commits, 2019/11/06