copy :: String -> String -> String -> IO ()
copy purpose from to =
- (do
+ do
h <- openFile to WriteMode
ls <- readFile from -- inefficient, but it'll do for now.
-- ToDo: speed up via slurping.
- hPutStrLn h ls
- hClose h) `catchAllIO`
- (\_ -> throwDyn (PhaseFailed purpose (ExitFailure 1)))
+ hPutStr h ls
+ hClose h
\end{code}
\begin{code}