From bdd01a39220facb029f4b79775e812ade610ec18 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 29 Jun 2001 15:30:14 +0000 Subject: [PATCH] [project @ 2001-06-29 15:30:14 by simonmar] Copy was ignoring its 'purpose' argument --- ghc/compiler/main/SysTools.lhs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index e2c43ff..0370535 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -245,7 +245,6 @@ initSysTools minusB_args -- our knowledge of $(PERL) on the host system here. ; let split_path = split_script mangle_path = mangle_script - #endif -- For all systems, copy and remove are provided by the host @@ -405,13 +404,15 @@ touch purpose arg = do p <- readIORef v_Pgm_T runSomething purpose p [arg] copy :: String -> String -> String -> IO () -copy purpose from to = - do - h <- openFile to WriteMode - ls <- readFile from -- inefficient, but it'll do for now. - -- ToDo: speed up via slurping. - hPutStr h ls - hClose h +copy purpose from to = do + verb <- dynFlag verbosity + when (verb >= 2) $ hPutStrLn stderr ("*** " ++ purpose) + + h <- openFile to WriteMode + ls <- readFile from -- inefficient, but it'll do for now. + -- ToDo: speed up via slurping. + hPutStr h ls + hClose h \end{code} \begin{code} -- 1.7.10.4