module Control.Effect.Empty
(
Empty(..)
, empty
, guard
, Algebra
, Has
, run
) where
import Control.Algebra
import Control.Effect.Empty.Internal (Empty(..))
empty :: Has Empty sig m => m a
empty :: forall (sig :: (* -> *) -> * -> *) (m :: * -> *) a.
Has Empty sig m =>
m a
empty = Empty m a -> m a
forall (eff :: (* -> *) -> * -> *) (sig :: (* -> *) -> * -> *)
(m :: * -> *) a.
(Member eff sig, Algebra sig m) =>
eff m a -> m a
send Empty m a
forall (m :: * -> *) k. Empty m k
Empty
{-# INLINE empty #-}
guard :: Has Empty sig m => Bool -> m ()
guard :: forall (sig :: (* -> *) -> * -> *) (m :: * -> *).
Has Empty sig m =>
Bool -> m ()
guard Bool
True = () -> m ()
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ()
guard Bool
False = m ()
forall (sig :: (* -> *) -> * -> *) (m :: * -> *) a.
Has Empty sig m =>
m a
empty
{-# INLINE guard #-}