From 3d83af853136ba69d5bf8728af1fc70648aa81c4 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 29 Jun 2001 15:37:52 +0000 Subject: [PATCH] [project @ 2001-06-29 15:37:52 by simonmar] The "Warning: deleting non-existent foo" message should only be printed in verbose mode. --- ghc/compiler/main/SysTools.lhs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 0370535..c42acb7 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -494,9 +494,11 @@ removeTmpFiles verb fs ("Deleting: " ++ unwords fs) (mapM_ rm fs) where - rm f = removeFile f `catchAllIO` - (\exn -> hPutStrLn stderr ("Warning: deleting non-existent " ++ f) >> - return ()) + rm f = removeFile f `catchAllIO` + (\_ignored -> + when (verb >= 2) $ + hPutStrLn stderr ("Warning: deleting non-existent " ++ f) + ) \end{code} -- 1.7.10.4