Rename withCatch to runCatch.

main
Rob Rix 2019-07-15 16:02:23 -04:00
parent 06a867679d
commit 073f8199dc
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
1 changed files with 3 additions and 3 deletions

View File

@ -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)