packages feed

network-protocol-xmpp 0.4.6 → 0.4.7

raw patch · 2 files changed

+15/−2 lines, 2 files

Files

lib/Network/Protocol/XMPP/ErrorT.hs view
@@ -20,6 +20,7 @@ 	, mapErrorT 	) where +import           Control.Applicative (Applicative, pure, (<*>)) import           Control.Monad (liftM) import           Control.Monad.Fix (MonadFix, mfix) import           Control.Monad.Trans (MonadIO, liftIO)@@ -35,6 +36,18 @@  instance Functor m => Functor (ErrorT e m) where 	fmap f = ErrorT . fmap (fmap f) . runErrorT++instance (Functor m, Monad m) => Applicative (ErrorT e m) where+	pure a  = ErrorT $ return (Right a)+	f <*> v = ErrorT $ do+		mf <- runErrorT f+		case mf of+			Left  e -> return (Left e)+			Right k -> do+				mv <- runErrorT v+				case mv of+					Left  e -> return (Left e)+					Right x -> return (Right (k x))  instance Monad m => Monad (ErrorT e m) where 	return = ErrorT . return . Right
network-protocol-xmpp.cabal view
@@ -1,5 +1,5 @@ name: network-protocol-xmpp-version: 0.4.6+version: 0.4.7 license: GPL-3 license-file: license.txt author: John Millikin <jmillikin@gmail.com>, Stephan Maka <stephan@spaceboyz.net>@@ -21,7 +21,7 @@ source-repository this   type: git   location: https://john-millikin.com/code/haskell-xmpp/-  tag: network-protocol-xmpp_0.4.6+  tag: network-protocol-xmpp_0.4.7  library   ghc-options: -Wall -O2