dev-haskell/enumerator: tweak for ghc-8.8

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/735866
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-08-04 22:20:17 +01:00
parent b168e12d2b
commit cc7132bd3c
2 changed files with 27 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
EAPI=7
# ebuild generated by hackport 0.3.4.9999
@@ -24,3 +24,7 @@ RDEPEND=">=dev-haskell/text-0.7:=[profile?]
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6.0.3
"
PATCHES=(
"${FILESDIR}"/${P}-ghc84.patch
)

View File

@@ -0,0 +1,21 @@
--- a/enumerator.cabal
+++ b/enumerator.cabal
@@ -152,2 +152,5 @@ library
+ if !impl(ghc >= 8.0)
+ build-depends: semigroups == 0.18.*
+
exposed-modules:
--- a/lib/Data/Enumerator/Internal.hs
+++ b/lib/Data/Enumerator/Internal.hs
@@ -50,2 +50,3 @@ import Data.Function (fix)
import Data.Monoid (Monoid, mempty, mappend, mconcat)
+import qualified Data.Semigroup as S
@@ -73,2 +74,6 @@ instance Monad Stream where
+instance S.Semigroup (Stream a) where
+ (<>) (Chunks xs) (Chunks ys) = Chunks (xs ++ ys)
+ (<>) _ _ = EOF
+
instance Monoid (Stream a) where