summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julian Ospald <hasufell@posteo.de> 2017-01-14 19:27:18 +0100
committerAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2017-02-06 11:19:43 +0100
commit6eea9c1fae93d50d3562cd6ef25e32b7d89b5a35 (patch)
tree03a6f1ac5574de24f6e132073d324ae1c0ffd54f
parent0d42b0e2e8ab15a5d52b0cc1f09bf8789d8d179d (diff)
downloadhaskell-6eea9c1fae93d50d3562cd6ef25e32b7d89b5a35.tar.gz
haskell-6eea9c1fae93d50d3562cd6ef25e32b7d89b5a35.tar.xz
dev-haskell/haddock-api: fix build with ghc-8.0.2
Change-Id: Ibe4a734e71c8bcc60ac7d218fdc1b6cdfc10cbfd Reviewed-on: https://galileo.mailstation.de/gerrit/8018 Reviewed-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r--packages/dev-haskell/haddock-api/files/d9bb5fc3823d720783e31e1e95ed5ed35c721b7b.patch36
-rw-r--r--packages/dev-haskell/haddock-api/haddock-api-2.17.3.exheres-04
2 files changed, 40 insertions, 0 deletions
diff --git a/packages/dev-haskell/haddock-api/files/d9bb5fc3823d720783e31e1e95ed5ed35c721b7b.patch b/packages/dev-haskell/haddock-api/files/d9bb5fc3823d720783e31e1e95ed5ed35c721b7b.patch
new file mode 100644
index 0000000..c933a9e
--- /dev/null
+++ b/packages/dev-haskell/haddock-api/files/d9bb5fc3823d720783e31e1e95ed5ed35c721b7b.patch
@@ -0,0 +1,36 @@
+From d9bb5fc3823d720783e31e1e95ed5ed35c721b7b Mon Sep 17 00:00:00 2001
+From: Simon Marlow <smarlow@fb.com>
+Date: Fri, 22 Jul 2016 02:55:04 -0700
+Subject: [PATCH] Disable NFData instances for GHC types when GHC >= 8.0.2
+
+(cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a)
+---
+ haddock-api/src/Haddock/Types.hs | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
+index eacf447..1703778 100644
+--- a/src/Haddock/Types.hs
++++ b/src/Haddock/Types.hs
+@@ -1,4 +1,6 @@
+-{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-}
++{-# LANGUAGE CPP #-}
++{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving #-}
++{-# LANGUAGE TypeFamilies, RecordWildCards #-}
+ {-# OPTIONS_GHC -fno-warn-orphans #-}
+ -----------------------------------------------------------------------------
+ -- |
+@@ -447,10 +449,12 @@ instance (NFData a, NFData mod)
+ DocExamples a -> a `deepseq` ()
+ DocHeader a -> a `deepseq` ()
+
+-
++#if !MIN_VERSION_ghc(8,0,2)
++-- These were added to GHC itself in 8.0.2
+ instance NFData Name where rnf x = seq x ()
+ instance NFData OccName where rnf x = seq x ()
+ instance NFData ModuleName where rnf x = seq x ()
++#endif
+
+ instance NFData id => NFData (Header id) where
+ rnf (Header a b) = a `deepseq` b `deepseq` ()
diff --git a/packages/dev-haskell/haddock-api/haddock-api-2.17.3.exheres-0 b/packages/dev-haskell/haddock-api/haddock-api-2.17.3.exheres-0
index 45d3170..67e146a 100644
--- a/packages/dev-haskell/haddock-api/haddock-api-2.17.3.exheres-0
+++ b/packages/dev-haskell/haddock-api/haddock-api-2.17.3.exheres-0
@@ -29,3 +29,7 @@ DEPENDENCIES="
RESTRICT="test"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/d9bb5fc3823d720783e31e1e95ed5ed35c721b7b.patch
+)
+