The Monad class defines the basic operations over a
*monad*, a concept from a branch of mathematics known as
*category theory*. From the perspective of a Haskell programmer,
however, it is best to think of a monad as an *abstract datatype*
of actions. Haskell's `do` expressions provide a convenient
syntax for writing monadic expressions.
Instances of Monad should satisfy the following:

*Left identity*`return a >>= k = k a`*Right identity*`m >>= return = m`*Associativity*`m >>= (\x -> k x >>= h) = (m >>= k) >>= h`

When a value is bound in `do`-notation, the pattern on the left
hand side of `<-` might not match. In this case, this class
provides a function to recover.
A Monad without a MonadFail instance may only be used in
conjunction with pattern that always match, such as newtypes, tuples,
data types with only a single data constructor, and irrefutable
patterns (`~pat`).
Instances of MonadFail should satisfy the following law:
`fail s` should be a left zero for >>=,

fail s >>= f = fail sIf your Monad is also MonadPlus, a popular definition is

fail _ = mzero

Monads that also support choice and failure.

**Packages**- is:exact