From d3aa719e358c478f79f7885fe26921e8487af33a Mon Sep 17 00:00:00 2001
From: Philipp Balzarek
Date: Tue, 11 Jun 2013 16:20:41 +0200
Subject: [PATCH] fix tryIOError
---
source/Network/Xmpp/Stream.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/Network/Xmpp/Stream.hs b/source/Network/Xmpp/Stream.hs
index c5901b0..2302969 100644
--- a/source/Network/Xmpp/Stream.hs
+++ b/source/Network/Xmpp/Stream.hs
@@ -824,4 +824,4 @@ mkStream con = Stream `fmap` atomically (newTMVar con)
-- "Borrowed" from base-4.4 for compatibility with GHC 7.0.1.
tryIOError :: IO a -> IO (Either IOError a)
-tryIOError f = catch (f >>= \r -> return (Right r)) (return . Left)
+tryIOError f = Ex.catch (Right <$> f) (return . Left)