~singpolyma/network-protocol-xmpp

635de446cce69eb5e1302eba6f8912d5c1e85cd3 — Vekhir 5 months ago de5a778
GHC 9.6 support

Hey there,

I'm working on updating the Arch packages to build with GHC 9.6, and 'network-protocol-xmpp' is one of them.
Alas, it is not possible to build it because the dependency 'gnutls' doesn't build with GHC 9.6 and is seemingly unmaintained.

This particular issue seems to only affect `lib/Network/Protocol/XMPP/Handle.hs`.

That rewrite apart, I can of course manually patch the issue myself, so I can build 'network-protocol-xmpp'. This unveiled several
errors in various files with regards to 'Control.Monad.Error' which was replaced with 'Control.Monad.Except'.

The attached patch makes 'network-protocol-xmpp' compatible with GHC 9.6. Please make a new release once you've applied it.

Regards,
Vekhir
M lib/Network/Protocol/XMPP/Client.hs => lib/Network/Protocol/XMPP/Client.hs +1 -1
@@ 19,7 19,7 @@ module Network.Protocol.XMPP.Client
	) where

import           Control.Monad ((>=>))
import           Control.Monad.Error (throwError)
import           Control.Monad.Except (throwError)
import           Control.Monad.Trans (liftIO)
import           Data.ByteString (ByteString)
import           Data.Text (Text)

M lib/Network/Protocol/XMPP/Client/Authentication.hs => lib/Network/Protocol/XMPP/Client/Authentication.hs +1 -1
@@ 21,7 21,7 @@ module Network.Protocol.XMPP.Client.Authentication
import qualified Control.Exception as Exc
import           Control.Monad (when)
import           Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Control.Monad.Error as E
import qualified Control.Monad.Except as E
import           Data.ByteString (ByteString)
import qualified Data.ByteString.Char8
import qualified Data.Text

M lib/Network/Protocol/XMPP/Component.hs => lib/Network/Protocol/XMPP/Component.hs +1 -1
@@ 20,7 20,7 @@ module Network.Protocol.XMPP.Component

import           Control.Applicative ((<|>))
import           Control.Monad (when)
import           Control.Monad.Error (throwError)
import           Control.Monad.Except (throwError)
import           Data.Bits (shiftR, (.&.))
import           Data.Char (intToDigit)
import qualified Data.ByteString

M lib/Network/Protocol/XMPP/ErrorT.hs => lib/Network/Protocol/XMPP/ErrorT.hs +2 -2
@@ 24,8 24,8 @@ import           Control.Applicative (Applicative, pure, (<*>))
import           Control.Monad.Fix (MonadFix, mfix)
import           Control.Monad.Trans (MonadIO, liftIO)
import           Control.Monad.Trans.Class (MonadTrans, lift)
import qualified Control.Monad.Error as E
import           Control.Monad.Error (ErrorType)
import qualified Control.Monad.Except as E
import           Control.Monad.Except (ErrorType)
import qualified Control.Monad.Reader as R
import           Control.Monad.Reader (EnvType)


M lib/Network/Protocol/XMPP/Handle.hs => lib/Network/Protocol/XMPP/Handle.hs +1 -1
@@ 22,7 22,7 @@ module Network.Protocol.XMPP.Handle
	) where

import           Control.Monad (when, void)
import qualified Control.Monad.Error as E
import qualified Control.Monad.Except as E
import           Control.Monad.Trans (liftIO)
import qualified Data.ByteString
import           Data.ByteString (ByteString)

M lib/Network/Protocol/XMPP/Monad.hs => lib/Network/Protocol/XMPP/Monad.hs +2 -2
@@ 42,8 42,8 @@ import qualified Control.Concurrent.MVar as M
import           Control.Monad (ap)
import           Control.Monad.Fix (MonadFix, mfix)
import           Control.Monad.Trans (MonadIO, liftIO)
import qualified Control.Monad.Error as E
import           Control.Monad.Error (ErrorType)
import qualified Control.Monad.Except as E
import           Control.Monad.Except (ErrorType)
import qualified Control.Monad.Reader as R
import qualified Data.ByteString
import           Data.ByteString (ByteString)