From cc9f5ba1b03f8755d4c558ca3bc3223175d2ee90 Mon Sep 17 00:00:00 2001 From: Sergey Alirzaev Date: Mon, 5 Feb 2018 19:45:01 +0300 Subject: [PATCH] adapt to conduit-1.3 --- pontarius-xmpp.cabal | 2 +- source/Network/Xmpp/Stream.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pontarius-xmpp.cabal b/pontarius-xmpp.cabal index 3e24d0e..daa6466 100644 --- a/pontarius-xmpp.cabal +++ b/pontarius-xmpp.cabal @@ -39,7 +39,7 @@ Library , base >4 && <5 , base64-bytestring >=0.1.0.0 , binary >=0.4.1 - , conduit >=1.2.4.2 && < 1.3 + , conduit >=1.3 && < 1.4 , 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 867de15..0717955 100644 --- a/source/Network/Xmpp/Stream.hs +++ b/source/Network/Xmpp/Stream.hs @@ -283,7 +283,7 @@ logInput = go Nothing bufferSrc :: Source (ErrorT XmppFailure IO) o -> IO (ConduitM i o (ErrorT XmppFailure IO) ()) bufferSrc src = do - ref <- newTMVarIO $ DCI.newResumableSource src + ref <- newTMVarIO $ DCI.sealConduitT src let go = do dt <- liftIO $ Ex.bracketOnError (atomically $ takeTMVar ref) @@ -304,7 +304,7 @@ bufferSrc src = do Right (Just d) -> yield d >> go return go where - zeroResumableSource = DCI.newResumableSource zeroSource + zeroResumableSource = DCI.sealConduitT zeroSource -- Reads the (partial) stream:stream and the server features from the stream. -- Returns the (unvalidated) stream attributes, the unparsed element, or