[project @ 2001-06-29 15:37:52 by simonmar]
authorsimonmar <unknown>
Fri, 29 Jun 2001 15:37:52 +0000 (15:37 +0000)
committersimonmar <unknown>
Fri, 29 Jun 2001 15:37:52 +0000 (15:37 +0000)
The "Warning: deleting non-existent foo" message should only be
printed in verbose mode.

ghc/compiler/main/SysTools.lhs

index 0370535..c42acb7 100644 (file)
@@ -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}