
Control.monad.trans.resource allocates resources which are guaranteed to be released. one point to note: all register cleanup actions live in the io monad, not the main monad. this allows both more efficient code, and for monads to be transformed.
this package provides a library for the haskell programming language. see http://www.haskell.org/ for more information on haskell.