-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Useful combinators for boolean expressions
--
-- Useful combinators for boolean expressions
@package control-bool
@version 0.2
-- | Useful combinators for boolean expressions
module Control.Bool
-- | Return its second argument if the boolean value is True,
-- otherwise return first.
bool :: a -> a -> Bool -> a
-- | A lifted not.
notF :: Functor f => f Bool -> f Bool
-- | A lifted (||).
(<||>) :: Applicative f => f Bool -> f Bool -> f Bool
-- | A lifted (&&).
(<&&>) :: Applicative f => f Bool -> f Bool -> f Bool
-- | An Alternative analogue of guard.
aguard :: Alternative m => Bool -> m ()
-- | aguard' b returns the second argument if b is True, otherwise
-- becomes empty.
aguard' :: Alternative m => Bool -> a -> m a
-- | A lifted not.
notM :: Monad m => m Bool -> m Bool
-- | A lifted (||), but it doesn't run the second argument if the
-- first returns True.
(<|=>) :: Monad m => m Bool -> m Bool -> m Bool
-- | A lifted (&&), but it doesn't run the second argument
-- if the first returns False.
(<&=>) :: Monad m => m Bool -> m Bool -> m Bool
-- | guard' b returns the second argument if b is True, otherwise
-- becomes mzero.
guard' :: MonadPlus m => Bool -> a -> m a
-- | guard' b returns the second argument if b is True, otherwise
-- becomes mzero.
guardM' :: MonadPlus m => m Bool -> a -> m a
-- | Run the action if the given monadic condition becomes True.
whenM :: (Monoid a, Monad m) => m Bool -> m a -> m a
-- | Run the action if the given monadic condition becomes False.
unlessM :: (Monoid a, Monad m) => m Bool -> m a -> m a
ifThenElseM :: Monad m => m Bool -> m a -> m a -> m a