app-emulation/ganeti-htools: tweak for ghc-7.10
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 10 Feb 2016 10:25:18 +0000 (10:25 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 10 Feb 2016 10:25:28 +0000 (10:25 +0000)
Package-Manager: portage-2.2.27

app-emulation/ganeti-htools/files/ganeti-htools-0.3.1-ghc-7.10.patch [new file with mode: 0644]
app-emulation/ganeti-htools/ganeti-htools-0.3.1.ebuild

diff --git a/app-emulation/ganeti-htools/files/ganeti-htools-0.3.1-ghc-7.10.patch b/app-emulation/ganeti-htools/files/ganeti-htools-0.3.1-ghc-7.10.patch
new file mode 100644 (file)
index 0000000..51c39fe
--- /dev/null
@@ -0,0 +1,29 @@
+diff --git a/Ganeti/HTools/Types.hs b/Ganeti/HTools/Types.hs
+index 104bf64..8146870 100644
+--- a/Ganeti/HTools/Types.hs
++++ b/Ganeti/HTools/Types.hs
+@@ -65,2 +65,4 @@ import qualified Data.Map as M
+ import qualified Text.JSON as JSON
++import Control.Applicative
++import Control.Monad
+@@ -221,2 +223,9 @@ data Result a
++instance Functor Result where
++    fmap  = liftM
++
++instance Applicative Result where
++    pure  = return
++    (<*>) = ap  -- defined in Control.Monad
++
+ instance Monad Result where
+@@ -252,2 +261,9 @@ data OpResult a = OpFail FailMode -- ^ Failed operation
++instance Functor OpResult where
++    fmap  = liftM
++
++instance Applicative OpResult where
++    pure  = return
++    (<*>) = ap  -- defined in Control.Monad
++
+ instance Monad OpResult where
index 251b669cc5a73ddc0f618a0c40cc02b3001d8af1..68482c2ee89cab37877e61879610a56e0c3b8d73 100644 (file)
@@ -33,6 +33,7 @@ src_prepare() {
        sed -i -e "s:) man:):" Makefile
        epatch "${FILESDIR}"/${PN}-0.2.8-use-QC-1.patch #316629
        epatch "${FILESDIR}"/${PN}-0.3.1-base-4.patch #424299
+       epatch "${FILESDIR}"/${PN}-0.3.1-ghc-7.10.patch
 }
 
 src_compile() {