protolude-0.2.4: A small prelude.

Safe HaskellSafe
LanguageHaskell2010

Protolude.Bool

Synopsis

Documentation

whenM :: Monad m => m Bool -> m () -> m () Source #

unlessM :: Monad m => m Bool -> m () -> m () Source #

ifM :: Monad m => m Bool -> m a -> m a -> m a Source #

guardM :: MonadPlus m => m Bool -> m () Source #

bool :: a -> a -> Bool -> a Source #

(&&^) :: Monad m => m Bool -> m Bool -> m Bool infixr 3 Source #

The && operator lifted to a monad. If the first argument evaluates to False the second argument will not be evaluated.

(||^) :: Monad m => m Bool -> m Bool -> m Bool infixr 2 Source #

The || operator lifted to a monad. If the first argument evaluates to True the second argument will not be evaluated.

(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 3 Source #

&& lifted to an Applicative. Unlike &&^ the operator is not short-circuiting.

(<||>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 2 Source #

|| lifted to an Applicative. Unlike ||^ the operator is not short-circuiting.