Browse Source

fix tryIOError

master
Philipp Balzarek 13 years ago
parent
commit
d3aa719e35
  1. 2
      source/Network/Xmpp/Stream.hs

2
source/Network/Xmpp/Stream.hs

@ -824,4 +824,4 @@ mkStream con = Stream `fmap` atomically (newTMVar con) @@ -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)

Loading…
Cancel
Save