Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/hps/files/, dev-haskell/hps/
Date: Wed, 05 Aug 2020 21:12:32
Message-Id: 1596661942.dfe2412fd89b3abd9efc1755bfc0c1939bbce9d6.slyfox@gentoo
1 commit: dfe2412fd89b3abd9efc1755bfc0c1939bbce9d6
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 5 21:12:08 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 5 21:12:22 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfe2412f
7
8 dev-haskell/hps: tweak for ghc-8.8
9
10 Reported-by: Agostino Sarubbo
11 Closes: https://bugs.gentoo.org/736028
12 Package-Manager: Portage-3.0.1, Repoman-2.3.23
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 dev-haskell/hps/files/hps-0.15-ghc84.patch | 28 ++++++++++++++++++++++++++++
16 dev-haskell/hps/hps-0.15.ebuild | 4 ++++
17 2 files changed, 32 insertions(+)
18
19 diff --git a/dev-haskell/hps/files/hps-0.15-ghc84.patch b/dev-haskell/hps/files/hps-0.15-ghc84.patch
20 new file mode 100644
21 index 00000000000..cbc67705459
22 --- /dev/null
23 +++ b/dev-haskell/hps/files/hps-0.15-ghc84.patch
24 @@ -0,0 +1,28 @@
25 +--- a/Graphics/PS/PS.hs
26 ++++ b/Graphics/PS/PS.hs
27 +@@ -14,2 +14,3 @@ import qualified Graphics.PS.Paper as P
28 + import qualified Graphics.PS.Image as I
29 ++import qualified Data.Semigroup as S
30 +
31 +@@ -248,2 +249,6 @@ newtype MonadMonoid m = MonadMonoid {appMonadMonoid :: m ()}
32 +
33 ++instance Monad m => S.Semigroup (MonadMonoid m) where
34 ++ (<>) (MonadMonoid a) (MonadMonoid b) =
35 ++ MonadMonoid (a >> b)
36 ++
37 + instance Monad m => Monoid (MonadMonoid m) where
38 +--- a/Graphics/PS/Statistics.hs
39 ++++ b/Graphics/PS/Statistics.hs
40 +@@ -6,2 +6,3 @@ import Graphics.PS.Image
41 + import Graphics.PS.Path
42 ++import qualified Data.Semigroup as S
43 +
44 +@@ -16,2 +17,8 @@ data Statistics = Statistics {nMoveTo :: Integer
45 +
46 ++instance S.Semigroup Statistics where
47 ++ (<>) p q =
48 ++ let (Statistics m1 l1 c1 f1 g1 t1) = p
49 ++ (Statistics m2 l2 c2 f2 g2 t2) = q
50 ++ in Statistics (m1+m2) (l1+l2) (c1+c2) (f1+f2) (g1+g2) (t1+t2)
51 ++
52 + instance Monoid Statistics where
53
54 diff --git a/dev-haskell/hps/hps-0.15.ebuild b/dev-haskell/hps/hps-0.15.ebuild
55 index 672d8d90b53..ca36c1bdc7f 100644
56 --- a/dev-haskell/hps/hps-0.15.ebuild
57 +++ b/dev-haskell/hps/hps-0.15.ebuild
58 @@ -25,6 +25,10 @@ DEPEND="${RDEPEND}
59 >=dev-haskell/cabal-1.8
60 "
61
62 +PATCHES=(
63 + "${FILESDIR}"/${P}-ghc84.patch
64 +)
65 +
66 src_configure() {
67 haskell-cabal_src_configure \
68 $(cabal_flag build-exec build-exec)