From f95b5de91e94c02a6c4881d402056466ccc7ef08 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 22 May 2015 17:07:33 +0200 Subject: [PATCH] port to conduit>1.2 fixes GH issue #81 --- pontarius-xmpp.cabal | 2 +- source/Network/Xmpp/Stream.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pontarius-xmpp.cabal b/pontarius-xmpp.cabal index 2eb919f..1550571 100644 --- a/pontarius-xmpp.cabal +++ b/pontarius-xmpp.cabal @@ -40,7 +40,7 @@ Library , base >4 && <5 , base64-bytestring >=0.1.0.0 , binary >=0.4.1 - , conduit >=1.0.1 && < 1.2 + , conduit >=1.2.4.2 && < 1.3 , containers >=0.4.0.0 , crypto-api >=0.9 , crypto-random >=0.0.5 diff --git a/source/Network/Xmpp/Stream.hs b/source/Network/Xmpp/Stream.hs index b94b288..24d705c 100644 --- a/source/Network/Xmpp/Stream.hs +++ b/source/Network/Xmpp/Stream.hs @@ -21,7 +21,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC8 import Data.Char (isSpace) -import Data.Conduit +import Data.Conduit hiding (connect) import qualified Data.Conduit.Internal as DCI import qualified Data.Conduit.List as CL import Data.IP @@ -260,7 +260,7 @@ sourceStreamHandle s = loopRead $ streamReceive s bufferSrc :: Source (ErrorT XmppFailure IO) o -> IO (ConduitM i o (ErrorT XmppFailure IO) ()) bufferSrc src = do - ref <- newTMVarIO $ DCI.ResumableSource src (return ()) + ref <- newTMVarIO $ DCI.newResumableSource src let go = do dt <- liftIO $ Ex.bracketOnError (atomically $ takeTMVar ref) @@ -281,7 +281,7 @@ bufferSrc src = do Right (Just d) -> yield d >> go return go where - zeroResumableSource = DCI.ResumableSource zeroSource (return ()) + zeroResumableSource = DCI.newResumableSource zeroSource -- Reads the (partial) stream:stream and the server features from the stream. -- Returns the (unvalidated) stream attributes, the unparsed element, or