From 3db6d1b8f2272f27e947e5347268a576452a6e77 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 11 Dec 2008 17:00:06 +0000 Subject: [PATCH] The default cleanup handler should /always/ delete the temp files 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. --- compiler/main/GHC.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index a5d82b8..00d5cbe 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -373,7 +373,7 @@ defaultCleanupHandler :: (ExceptionMonad m, MonadIO m) => DynFlags -> m a -> m a defaultCleanupHandler dflags inner = -- make sure we clean up after ourselves - inner `gonException` + inner `gfinally` (liftIO $ do cleanTempFiles dflags cleanTempDirs dflags -- 1.7.10.4