@hackage teardown0.4.0.0

Build composable components for your application with clear teardown semantics

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, even on the scenario where cleanup is invoked multiple times

  • Ensures that if errors occur on the execution of one teardown, the error does not propagate to other sub-routines; effectively keeping them isolated.

  • 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.