From: simonmar Date: Fri, 29 Jun 2001 15:37:52 +0000 (+0000) Subject: [project @ 2001-06-29 15:37:52 by simonmar] X-Git-Tag: Approximately_9120_patches~1641 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3d83af853136ba69d5bf8728af1fc70648aa81c4;p=ghc-hetmet.git [project @ 2001-06-29 15:37:52 by simonmar] The "Warning: deleting non-existent foo" message should only be printed in verbose mode. --- 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}