protolude-0.3.4: A small prelude.

Safe Haskell | Safe
Language | Haskell2010

Protolude.Bool

Synopsis

- whenM :: Monad m => m Bool -> m () -> m ()
- unlessM :: Monad m => m Bool -> m () -> m ()
- ifM :: Monad m => m Bool -> m a -> m a -> m a
- guardM :: MonadPlus m => m Bool -> m ()
- bool :: a -> a -> Bool -> a
- (&&^) :: Monad m => m Bool -> m Bool -> m Bool
- (||^) :: Monad m => m Bool -> m Bool -> m Bool
- (<&&>) :: Applicative a => a Bool -> a Bool -> a Bool
- (<||>) :: Applicative a => a Bool -> a Bool -> a Bool

# Documentation

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

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

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

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

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

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

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 #

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 #

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

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

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