Copy was ignoring its 'purpose' argument
-- our knowledge of $(PERL) on the host system here.
; let split_path = split_script
mangle_path = mangle_script
-- 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
#endif
-- For all systems, copy and remove are provided by the host
runSomething purpose p [arg]
copy :: String -> String -> String -> IO ()
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