copyFile function in Haddock, VSHaskell & Cabal

I have found a bug in CVS Haddock. It uses the following definition of copyFile function: copyFile f = do s <- readFile (libdir ++ pathSeparator:f) writeFile (odir ++ pathSeparator:f) s (See HaddockHtml.hs) This works well for text files but the function fails when it is used to copy binary files under Windows. Similar functions are used also in VSHaskell and Cabal. I propose to add copyFile function to System.Directory which will take care of binary files. The function signature is simple: copyFile :: FilePath -> FilePath -> IO () In the attached file there are two implementations. The first is a more portable but slower and the second is GHC specific but is faster. Any suggestions Krasimir __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail
participants (1)
-
Krasimir Angelov