From d163ee7393bcfcc2503698ea58db646546cfb55f Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 8 Jul 2013 09:47:25 -0400 Subject: clientRequestsSubscription work in progress... --- Presence/ControlMaybe.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Presence/ControlMaybe.hs') diff --git a/Presence/ControlMaybe.hs b/Presence/ControlMaybe.hs index 37f6f93c..69a38f71 100644 --- a/Presence/ControlMaybe.hs +++ b/Presence/ControlMaybe.hs @@ -15,5 +15,9 @@ whenJust acn f = do catchIO_ :: IO a -> IO a -> IO a catchIO_ a h = Exception.catch a (\(_ :: IOException) -> h) +catchIO :: IO a -> (IOException -> IO a) -> IO a +catchIO body handler = Exception.catch body handler + handleIO_ = flip catchIO_ +handleIO = flip catchIO -- cgit v1.2.3