summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2015-12-06 10:46:25 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2015-12-06 10:46:40 +0000
commitabcc397e67a3f26bf05b88d4ac6e735748367b4c (patch)
treee437187add6f75afeca16c9c35227024388947a2 /dev-haskell
parentprofiles/package.mask remove un-needed entry of xen-tools (diff)
downloadgentoo-abcc397e67a3f26bf05b88d4ac6e735748367b4c.tar.gz
gentoo-abcc397e67a3f26bf05b88d4ac6e735748367b4c.tar.bz2
gentoo-abcc397e67a3f26bf05b88d4ac6e735748367b4c.zip
dev-haskell/text: backport deepseq-1.4 support
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/458 Bug: https://github.com/bos/text/issues/100 Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/text/files/text-1.1.1.3-deepseq-1.4.patch33
-rw-r--r--dev-haskell/text/text-1.1.1.3.ebuild4
2 files changed, 37 insertions, 0 deletions
diff --git a/dev-haskell/text/files/text-1.1.1.3-deepseq-1.4.patch b/dev-haskell/text/files/text-1.1.1.3-deepseq-1.4.patch
new file mode 100644
index 00000000000..524ebac371e
--- /dev/null
+++ b/dev-haskell/text/files/text-1.1.1.3-deepseq-1.4.patch
@@ -0,0 +1,33 @@
+commit 4115e196bde073d5deaa3759807a8647f3f3c6fa
+Author: Herbert Valerio Riedel <hvr@gnu.org>
+Date: Mon Nov 17 09:53:24 2014 +0100
+
+ Add support for `deepseq-1.4.0.0` (addresses #100)
+
+ The default method implementation has changed in `deepseq-1.4.0.0`.
+ (see haskell/deepseq#1 for details). This simply sets the `rnf`
+ implementation explicitly to avoid relying on the default method's
+ semantics.
+
+diff --git a/Data/Text.hs b/Data/Text.hs
+index 3bd34a7..b826acd 100644
+--- a/Data/Text.hs
++++ b/Data/Text.hs
+@@ -199,7 +199,7 @@ import Prelude (Char, Bool(..), Int, Maybe(..), String,
+ (&&), (||), (+), (-), (.), ($), ($!), (>>),
+ not, return, otherwise, quot)
+ #if defined(HAVE_DEEPSEQ)
+-import Control.DeepSeq (NFData)
++import Control.DeepSeq (NFData(rnf))
+ #endif
+ #if defined(ASSERTS)
+ import Control.Exception (assert)
+@@ -346,7 +346,7 @@ instance Exts.IsList Text where
+ #endif
+
+ #if defined(HAVE_DEEPSEQ)
+-instance NFData Text
++instance NFData Text where rnf !_ = ()
+ #endif
+
+ -- | This instance preserves data abstraction at the cost of inefficiency.
diff --git a/dev-haskell/text/text-1.1.1.3.ebuild b/dev-haskell/text/text-1.1.1.3.ebuild
index 85beb535024..755eda66e1c 100644
--- a/dev-haskell/text/text-1.1.1.3.ebuild
+++ b/dev-haskell/text/text-1.1.1.3.ebuild
@@ -32,6 +32,10 @@ DEPEND="${RDEPEND}
# >=dev-haskell/test-framework-hunit-0.2
# >=dev-haskell/test-framework-quickcheck2-0.2 )
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-deepseq-1.4.patch
+}
+
src_configure() {
haskell-cabal_src_configure \
--flag=-developer