From 073f8199dcd317970c10acf14e208316fdc8503b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 15 Jul 2019 16:02:23 -0400 Subject: [PATCH] Rename withCatch to runCatch. --- src/Control/Effect/Catch.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Control/Effect/Catch.hs b/src/Control/Effect/Catch.hs index 4cd5683..3bebac4 100644 --- a/src/Control/Effect/Catch.hs +++ b/src/Control/Effect/Catch.hs @@ -13,7 +13,7 @@ module Control.Effect.Catch ( Catch (..) , catch , catchSync - , withCatch + , runCatch , CatchC (..) ) where @@ -69,8 +69,8 @@ unliftCatch handler = runReader (Handler handler) . runCatchC -- | Evaluate a 'Catch' effect, using 'MonadUnliftIO' to infer a correct -- unlifting function. -withCatch :: MonadUnliftIO m => CatchC m a -> m a -withCatch c = withRunInIO (\f -> runHandler (Handler f) c) +runCatch :: MonadUnliftIO m => CatchC m a -> m a +runCatch c = withRunInIO (\f -> runHandler (Handler f) c) newtype Handler m = Handler (forall x . m x -> IO x)