Not only if there has been an exception. It worked for GHC anyway,
as it was getting an ExitSuccess exception, but GHC API clients
shouldn't be required to do that.
DynFlags -> m a -> m a
defaultCleanupHandler dflags inner =
-- make sure we clean up after ourselves
DynFlags -> m a -> m a
defaultCleanupHandler dflags inner =
-- make sure we clean up after ourselves
(liftIO $ do
cleanTempFiles dflags
cleanTempDirs dflags
(liftIO $ do
cleanTempFiles dflags
cleanTempDirs dflags