summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-08-05 22:12:08 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-08-05 22:12:22 +0100
commitdfe2412fd89b3abd9efc1755bfc0c1939bbce9d6 (patch)
tree74f2f8fd6788695bef684794b15853036a840367 /dev-haskell/hps
parentdev-java/swt: append-cflags -fcommon (diff)
downloadgentoo-dfe2412fd89b3abd9efc1755bfc0c1939bbce9d6.tar.gz
gentoo-dfe2412fd89b3abd9efc1755bfc0c1939bbce9d6.tar.bz2
gentoo-dfe2412fd89b3abd9efc1755bfc0c1939bbce9d6.zip
dev-haskell/hps: tweak for ghc-8.8
Reported-by: Agostino Sarubbo Closes: https://bugs.gentoo.org/736028 Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell/hps')
-rw-r--r--dev-haskell/hps/files/hps-0.15-ghc84.patch28
-rw-r--r--dev-haskell/hps/hps-0.15.ebuild4
2 files changed, 32 insertions, 0 deletions
diff --git a/dev-haskell/hps/files/hps-0.15-ghc84.patch b/dev-haskell/hps/files/hps-0.15-ghc84.patch
new file mode 100644
index 000000000000..cbc67705459a
--- /dev/null
+++ b/dev-haskell/hps/files/hps-0.15-ghc84.patch
@@ -0,0 +1,28 @@
+--- a/Graphics/PS/PS.hs
++++ b/Graphics/PS/PS.hs
+@@ -14,2 +14,3 @@ import qualified Graphics.PS.Paper as P
+ import qualified Graphics.PS.Image as I
++import qualified Data.Semigroup as S
+
+@@ -248,2 +249,6 @@ newtype MonadMonoid m = MonadMonoid {appMonadMonoid :: m ()}
+
++instance Monad m => S.Semigroup (MonadMonoid m) where
++ (<>) (MonadMonoid a) (MonadMonoid b) =
++ MonadMonoid (a >> b)
++
+ instance Monad m => Monoid (MonadMonoid m) where
+--- a/Graphics/PS/Statistics.hs
++++ b/Graphics/PS/Statistics.hs
+@@ -6,2 +6,3 @@ import Graphics.PS.Image
+ import Graphics.PS.Path
++import qualified Data.Semigroup as S
+
+@@ -16,2 +17,8 @@ data Statistics = Statistics {nMoveTo :: Integer
+
++instance S.Semigroup Statistics where
++ (<>) p q =
++ let (Statistics m1 l1 c1 f1 g1 t1) = p
++ (Statistics m2 l2 c2 f2 g2 t2) = q
++ in Statistics (m1+m2) (l1+l2) (c1+c2) (f1+f2) (g1+g2) (t1+t2)
++
+ instance Monoid Statistics where
diff --git a/dev-haskell/hps/hps-0.15.ebuild b/dev-haskell/hps/hps-0.15.ebuild
index 672d8d90b532..ca36c1bdc7f8 100644
--- a/dev-haskell/hps/hps-0.15.ebuild
+++ b/dev-haskell/hps/hps-0.15.ebuild
@@ -25,6 +25,10 @@ DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.8
"
+PATCHES=(
+ "${FILESDIR}"/${P}-ghc84.patch
+)
+
src_configure() {
haskell-cabal_src_configure \
$(cabal_flag build-exec build-exec)