haskell-iconv: GHC 7.10.x support was added upstream
This commit is contained in:
parent
873fa649e8
commit
682e37e586
@ -292,7 +292,4 @@ self: super: {
|
||||
x509-store = appendConfigureFlag super.x509-store "-fignore-me-1";
|
||||
x509-system = appendConfigureFlag super.x509-system "-fignore-me-1";
|
||||
|
||||
# Fix compilation under GHC 7.10, patch has been sent upstream.
|
||||
iconv = appendPatch super.iconv ./iconv-fix-ghc710.patch;
|
||||
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
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