monad-finally

Guard monadic computations with cleanup actions

https://github.com/mvv/monad-finally

Latest on Hackage:0.1.2.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed and maintained by Mikhail Vorozhtsov

This package provides a generalized version of Control.Exception.finally. The cleanup action is run not only on successful termination of the main computation and on errors, but on any control flow disruption (e.g. mzero, short-circuiting) that causes the main computation to not produce a result.