{-# language Safe #-}
module LazyAsync.Actions.StartWait where
import LazyAsync.Actions.Start (start)
import LazyAsync.Actions.Wait (wait, waitCatch)
import LazyAsync.Types (LazyAsync, Outcome)
import LazyAsync.Prelude (Applicative ((*>)), IO, MonadBaseControl (StM),
MonadIO)
startWait :: (MonadBaseControl base m, MonadIO base) => LazyAsync (StM m a) -> m a
startWait :: forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m a
startWait LazyAsync (StM m a)
x = forall (base :: * -> *) (m :: * -> *) a.
(MonadBase base m, MonadIO base) =>
LazyAsync a -> m ()
start LazyAsync (StM m a)
x forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
*> forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m a
wait LazyAsync (StM m a)
x
startWaitIO :: LazyAsync a -> IO a
startWaitIO :: forall a. LazyAsync a -> IO a
startWaitIO = forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m a
startWait
startWaitCatch :: (MonadBaseControl base m, MonadIO base) => LazyAsync (StM m a) -> m (Outcome a)
startWaitCatch :: forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m (Outcome a)
startWaitCatch LazyAsync (StM m a)
x = forall (base :: * -> *) (m :: * -> *) a.
(MonadBase base m, MonadIO base) =>
LazyAsync a -> m ()
start LazyAsync (StM m a)
x forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
*> forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m (Outcome a)
waitCatch LazyAsync (StM m a)
x
startWaitCatchIO :: LazyAsync a -> IO (Outcome a)
startWaitCatchIO :: forall a. LazyAsync a -> IO (Outcome a)
startWaitCatchIO = forall (base :: * -> *) (m :: * -> *) a.
(MonadBaseControl base m, MonadIO base) =>
LazyAsync (StM m a) -> m (Outcome a)
startWaitCatch