module Control.Effect.Intercept
(
Intercept(..)
, InterceptCont(..)
, InterceptionMode(..)
, intercept
, interceptCont
, interceptCont1
, runInterceptCont
, runInterceptR
, runStateStepped
, runTellStepped
, runTellListStepped
, runListenStepped
, SteppedThreads
, InterceptContC
, InterceptRC
, SteppedC
, ListenSteppedC
) where
import Control.Effect
import Control.Effect.Stepped
import Control.Effect.Internal.Intercept
intercept :: Eff (Intercept e) m => (forall x. e m x -> m x) -> m a -> m a
intercept h m = send (Intercept h m)
{-# INLINE intercept #-}
interceptCont :: Eff (InterceptCont e) m
=> (forall x. (x -> m a) -> e m x -> m a)
-> m a -> m a
interceptCont h m = send (InterceptCont InterceptAll h m)
{-# INLINE interceptCont #-}
interceptCont1 :: Eff (InterceptCont e) m
=> (forall x. (x -> m a) -> e m x -> m a)
-> m a -> m a
interceptCont1 h m = send (InterceptCont InterceptOne h m)
{-# INLINE interceptCont1 #-}