Merge pull request #8084 from rycee/fix/haskell-iconv
Add patch for haskell-iconv to support GHC 7.10.
This commit is contained in:
commit
7975d6860f
@ -284,4 +284,7 @@ self: super: {
|
|||||||
# Ugly hack to trigger a rebuild to fix the broken package on Hydra.
|
# Ugly hack to trigger a rebuild to fix the broken package on Hydra.
|
||||||
crypto-api = appendConfigureFlag super.crypto-api "-fignore-me-1";
|
crypto-api = appendConfigureFlag super.crypto-api "-fignore-me-1";
|
||||||
|
|
||||||
|
# Fix compilation under GHC 7.10, patch has been sent upstream.
|
||||||
|
iconv = appendPatch super.iconv ./iconv-fix-ghc710.patch;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
41
pkgs/development/haskell-modules/iconv-fix-ghc710.patch
Normal file
41
pkgs/development/haskell-modules/iconv-fix-ghc710.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
Running command 'diff -urN old-iconv new-iconv'
|
||||||
|
Fri May 29 00:42:30 CEST 2015 Robert Helgesson <robert@rycee.net>
|
||||||
|
* Add Functor and Applicative instances for IConv
|
||||||
|
|
||||||
|
This makes iconv successfully build under GHC 7.10.
|
||||||
|
diff -urN old-iconv/Codec/Text/IConv/Internal.hs new-iconv/Codec/Text/IConv/Internal.hs
|
||||||
|
--- old-iconv/Codec/Text/IConv/Internal.hs 2015-05-31 11:26:06.410968449 +0200
|
||||||
|
+++ new-iconv/Codec/Text/IConv/Internal.hs 2015-05-31 11:26:06.410968449 +0200
|
||||||
|
@@ -49,6 +49,7 @@
|
||||||
|
import System.IO.Unsafe (unsafeInterleaveIO, unsafePerformIO)
|
||||||
|
import System.IO (hPutStrLn, stderr)
|
||||||
|
import Control.Exception (assert)
|
||||||
|
+import Control.Monad (ap, liftM)
|
||||||
|
|
||||||
|
import Prelude hiding (length)
|
||||||
|
|
||||||
|
@@ -192,8 +193,8 @@
|
||||||
|
-}
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
--- IConv monad
|
||||||
|
+----------------------------------------
|
||||||
|
+-- IConv functor, applicative, and monad
|
||||||
|
--
|
||||||
|
|
||||||
|
newtype IConv a = I {
|
||||||
|
@@ -202,6 +203,13 @@
|
||||||
|
-> IO (Buffers, a)
|
||||||
|
}
|
||||||
|
|
||||||
|
+instance Functor IConv where
|
||||||
|
+ fmap = liftM
|
||||||
|
+
|
||||||
|
+instance Applicative IConv where
|
||||||
|
+ pure = return
|
||||||
|
+ (<*>) = ap
|
||||||
|
+
|
||||||
|
instance Monad IConv where
|
||||||
|
(>>=) = bindI
|
||||||
|
-- m >>= f = (m `bindI` \a -> consistencyCheck `thenI` returnI a) `bindI` f
|
Loading…
Reference in New Issue
Block a user