Run a computation and always perform a second, final computation even
if an exception is raised. If a short-circuiting monad transformer such
as ErrorT or MaybeT is used to transform a MonadException monad, then the
implementation of finally for the transformed monad must guarantee that
the final action is also always performed when any short-circuiting
occurs.

Executes a computation with asynchronous exceptions masked. The
argument passed to mask is a function that takes as its argument
another function, which can be used to restore the prevailing masking
state within the context of the masked computation.

When you want to acquire a resource, do some work with it, and then release
the resource, it is a good idea to use bracket, because bracket will
install the necessary exception handler to release the resource in the event
that an exception is raised during the computation. If an exception is
raised, then bracket will re-raise the exception (after performing the
release).