@hackage teardown0.5.0.1

Build safe and composable teardown sub-routines for resources

The teardown library allows you to reliably execute cleanup sub-routines for allocated resources. When a program is initialized, it:

  • Ensures that teardown sub-routines are executed exactly once

  • Ensures that if errors occur on the execution of a Teardown sub-routine, the error does not propagate to others; bulkheading failure on cleanup.

  • Requires every sub-routine to be documented at creation time; thus helping tracing your application structure.

  • Allows tracing the teardown of your application, how is structured, how much time it takes to execute, and what component (if any) failed to finalize.