copyFile function in Haddock, VSHaskell & Cabal
ka2_mail at yahoo.com
Thu Jul 29 03:18:45 EDT 2004
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
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.
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2379 bytes
Url : http://www.haskell.org//pipermail/libraries/attachments/20040729/fb4e2c6f/CopyFile-0001.obj
More information about the Libraries