diff options
author | Timothy Sample <samplet@ngyro.com> | 2019-11-01 21:56:40 -0400 |
---|---|---|
committer | Timothy Sample <samplet@ngyro.com> | 2019-11-20 20:48:28 -0500 |
commit | a531ff94c3dcf480be5c085c52f2c2d9bc532712 (patch) | |
tree | 98dc9cbdb3e2388bf2d4e961f8f2d06de6855ccc /gnu/packages/patches | |
parent | cdffb73c04d0c68d7edf19ee02fc3a554dea04bc (diff) | |
download | guix-a531ff94c3dcf480be5c085c52f2c2d9bc532712.tar guix-a531ff94c3dcf480be5c085c52f2c2d9bc532712.tar.gz |
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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ghc-diff-swap-cover-args.patch | 20 |
1 files changed, 20 insertions, 0 deletions
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 0000000000..724416ff7a --- /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 |