|Maintainer||Bas van Dijk <email@example.com>|
This module is not intended for end-users. It should only be used by library
authors wishing to extend this
IO computation that closes or finalizes a resource. For example
hClose someHandle" or "
Duplicating a finalizer means that instead of it being performed when the current region terminates it is performed when the parent region terminates.
Finalizer in the region. When the region terminates all
registered finalizers will be perfomed if they're not duplicated to a parent
Note that finalizers are run in LIFO order (Last In First Out). So executing the following:
runRegionT $ do _ <- onExit $ putStrLn "finalizer 1" _ <- onExit $ putStrLn "finalizer 2" return ()
finalizer 2 finalizer 1