Rename withCatch to runCatch.
parent
06a867679d
commit
073f8199dc
|
@ -13,7 +13,7 @@ module Control.Effect.Catch
|
||||||
( Catch (..)
|
( Catch (..)
|
||||||
, catch
|
, catch
|
||||||
, catchSync
|
, catchSync
|
||||||
, withCatch
|
, runCatch
|
||||||
, CatchC (..)
|
, CatchC (..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ unliftCatch handler = runReader (Handler handler) . runCatchC
|
||||||
|
|
||||||
-- | Evaluate a 'Catch' effect, using 'MonadUnliftIO' to infer a correct
|
-- | Evaluate a 'Catch' effect, using 'MonadUnliftIO' to infer a correct
|
||||||
-- unlifting function.
|
-- unlifting function.
|
||||||
withCatch :: MonadUnliftIO m => CatchC m a -> m a
|
runCatch :: MonadUnliftIO m => CatchC m a -> m a
|
||||||
withCatch c = withRunInIO (\f -> runHandler (Handler f) c)
|
runCatch c = withRunInIO (\f -> runHandler (Handler f) c)
|
||||||
|
|
||||||
newtype Handler m = Handler (forall x . m x -> IO x)
|
newtype Handler m = Handler (forall x . m x -> IO x)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue