[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
199/329: gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6.
From: |
guix-commits |
Subject: |
199/329: gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6. |
Date: |
Wed, 20 Nov 2019 21:18:00 -0500 (EST) |
samplet pushed a commit to branch master
in repository guix.
commit faac56f3af797973c4a8400d841bbddc303e924b
Author: Timothy Sample <address@hidden>
Date: Sun Nov 3 10:54:04 2019 -0500
gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6.
* gnu/packages/patches/ghc-monad-par-fix-tests.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/haskell-xyz.scm (ghc-monad-par): Use it.
---
gnu/local.mk | 3 +-
gnu/packages/haskell-xyz.scm | 1 +
gnu/packages/patches/ghc-monad-par-fix-tests.patch | 45 ++++++++++++++++++++++
3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index a9548d4..c6f0dfd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -880,7 +880,8 @@ dist_patch_DATA =
\
%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/ghc-haddock-library-unbundle.patch \
+ %D%/packages/patches/ghc-monad-par-fix-tests.patch \
%D%/packages/patches/ghostscript-no-header-id.patch \
%D%/packages/patches/ghostscript-no-header-uuid.patch \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 30d9098..604c2de 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -6541,6 +6541,7 @@ operators for looping.")
(uri (string-append "https://hackage.haskell.org/package/"
"monad-par-" version "/"
"monad-par-" version ".tar.gz"))
+ (patches (search-patches "ghc-monad-par-fix-tests.patch"))
(sha256
(base32
"0ldrzqy24fsszvn2a2nr77m2ih7xm0h9bgkjyv1l274aj18xyk7q"))))
diff --git a/gnu/packages/patches/ghc-monad-par-fix-tests.patch
b/gnu/packages/patches/ghc-monad-par-fix-tests.patch
new file mode 100644
index 0000000..d21a1e4
--- /dev/null
+++ b/gnu/packages/patches/ghc-monad-par-fix-tests.patch
@@ -0,0 +1,45 @@
+This patch is taken from upstream. It fixes a test to work with GHC 8.6.
+The paths have been slightly altered to work with the release tarball.
+
+See <https://github.com/simonmar/monad-par/issues/66>.
+
+From e20f81c8060208e4fb038e8f0e0668b41d72a6fb Mon Sep 17 00:00:00 2001
+From: Clint Adams <address@hidden>
+Date: Sat, 31 Aug 2019 14:12:34 -0400
+Subject: [PATCH] Use a case statement instead of pattern-matching in
+ case_test_diamond
+
+This avoids the need for a MonadFail instance. Closes #66
+---
+ monad-par/tests/ParTests_shared.hs | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/tests/ParTests_shared.hs b/tests/ParTests_shared.hs
+index 31f438d..b2de50c 100644
+--- a/tests/ParTests_shared.hs
++++ b/tests/ParTests_shared.hs
+@@ -109,12 +109,15 @@ case_test_diamond :: Assertion
+ case_test_diamond = 9 @=? (m :: Int)
+ where
+ m = runPar $ do
+- [a,b,c,d] <- sequence [new,new,new,new]
+- fork $ do x <- get a; put b (x+1)
+- fork $ do x <- get a; put c (x+2)
+- fork $ do x <- get b; y <- get c; put d (x+y)
+- fork $ do put a 3
+- get d
++ abcd <- sequence [new,new,new,new]
++ case abcd of
++ [a,b,c,d] -> do
++ fork $ do x <- get a; put b (x+1)
++ fork $ do x <- get a; put c (x+2)
++ fork $ do x <- get b; y <- get c; put d (x+y)
++ fork $ do put a 3
++ get d
++ _ -> error "Oops"
+
+ -- | Violate IVar single-assignment:
+ --
+--
+2.23.0
+
- 174/329: gnu: ghc-io-streams: Update to 1.5.1.0., (continued)
- 174/329: gnu: ghc-io-streams: Update to 1.5.1.0., guix-commits, 2019/11/20
- 183/329: gnu: ghc-http-client: Update to 0.6.4., guix-commits, 2019/11/20
- 171/329: gnu: ghc-cgi: Update to 3001.4.0.0., guix-commits, 2019/11/20
- 184/329: gnu: ghc-profunctors: Update to 5.3., guix-commits, 2019/11/20
- 180/329: gnu: ghc-hslua-module-text: Update to 0.2.1., guix-commits, 2019/11/20
- 182/329: gnu: ghc-snap-core: Update to 1.0.4.0., guix-commits, 2019/11/20
- 185/329: gnu: ghc-aeson-pretty: Update to 0.8.8., guix-commits, 2019/11/20
- 189/329: gnu: ghc-shakespeare: Update to 2.0.22., guix-commits, 2019/11/20
- 194/329: gnu: ghc-http-api-data: Update to 0.4.1., guix-commits, 2019/11/20
- 200/329: gnu: Add ghc-dense-linear-algebra., guix-commits, 2019/11/20
- 199/329: gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6.,
guix-commits <=
- 209/329: gnu: ghc-bsb-http-chunked: Update to 0.0.0.4., guix-commits, 2019/11/20
- 212/329: gnu: ghc-uri-bytestring: Update to 0.3.2.2., guix-commits, 2019/11/20
- 214/329: gnu: ghc-free: Update to 5.1.2., guix-commits, 2019/11/20
- 218/329: gnu: ghc-exactprint: Update to 0.6.1., guix-commits, 2019/11/20
- 220/329: gnu: ghc-contravariant-extras: Update Cabal file to r1., guix-commits, 2019/11/20
- 219/329: gnu: ghc-wai-logger: Update to 2.3.5., guix-commits, 2019/11/20
- 223/329: gnu: ghc-rebase: Update to 1.3.1.1., guix-commits, 2019/11/20
- 222/329: gnu: ghc-cryptohash-sha1: Update Cabal file to r4., guix-commits, 2019/11/20
- 226/329: gnu: ghc-vector-builder: Update to 0.3.8., guix-commits, 2019/11/20
- 230/329: gnu: ghc-conduit-extra: Update to 1.3.4., guix-commits, 2019/11/20