[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
186/328: gnu: ghc-diff: Patch to work with newer QuickCheck.
From: |
guix-commits |
Subject: |
186/328: gnu: ghc-diff: Patch to work with newer QuickCheck. |
Date: |
Sat, 16 Nov 2019 19:33:04 -0500 (EST) |
samplet pushed a commit to branch wip-haskell-updates
in repository guix.
commit ada7e4f9642c882ead144561624794e403d9b01b
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 8a52e98..cb01b66 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -878,6 +878,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 c8fbec0..86e0d2a 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -2606,6 +2606,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
- 140/328: gnu: ghc-atomic-write: Update to 0.2.0.6., (continued)
- 140/328: gnu: ghc-atomic-write: Update to 0.2.0.6., guix-commits, 2019/11/16
- 142/328: gnu: ghc-network: Update to 2.8.0.1., guix-commits, 2019/11/16
- 147/328: gnu: ghc-system-fileio: Update to 0.3.16.4., guix-commits, 2019/11/16
- 165/328: gnu: ghc-haskell-src-exts-util: Update to 0.2.5., guix-commits, 2019/11/16
- 169/328: gnu: ghc-httpd-shed: Update to 0.4.1.1., guix-commits, 2019/11/16
- 182/328: gnu: ghc-snap-core: Update to 1.0.4.0., guix-commits, 2019/11/16
- 190/328: gnu: ghc-aeson-compat: Update to 0.3.9., guix-commits, 2019/11/16
- 187/328: gnu: ghc-skylighting-core: Update to 0.8.2.1., guix-commits, 2019/11/16
- 191/328: gnu: ghc-pandoc-types: Update to 1.17.6.1., guix-commits, 2019/11/16
- 197/328: gnu: ghc-inline-c-cpp: Update to 0.3.0.3., guix-commits, 2019/11/16
- 186/328: gnu: ghc-diff: Patch to work with newer QuickCheck.,
guix-commits <=
- 200/328: gnu: Add ghc-dense-linear-algebra., guix-commits, 2019/11/16
- 203/328: gnu: ghc-vault: Update to 0.3.1.3., guix-commits, 2019/11/16
- 205/328: gnu: Add ghc-network-byte-order., guix-commits, 2019/11/16
- 209/328: gnu: ghc-bsb-http-chunked: Update to 0.0.0.4., guix-commits, 2019/11/16
- 216/328: gnu: ghc-wai: Update to 3.2.2.1., guix-commits, 2019/11/16
- 219/328: gnu: ghc-wai-logger: Update to 2.3.5., guix-commits, 2019/11/16
- 218/328: gnu: ghc-exactprint: Update to 0.6.1., guix-commits, 2019/11/16
- 220/328: gnu: ghc-contravariant-extras: Update Cabal file to r1., guix-commits, 2019/11/16
- 224/328: gnu: ghc-rerebase: Update to 1.3.1.1., guix-commits, 2019/11/16
- 228/328: gnu: ghc-mono-traversable: Update to 1.0.13.0., guix-commits, 2019/11/16