Applied. Thanks! David
On Thu, Jun 12, 2008 at 01:10:50PM +0000, [EMAIL PROTECTED] wrote: > Just as Ian called it... > > Thu Jun 12 13:57:19 BST 2008 Eric Kow <[EMAIL PROTECTED]> > * Resolve issue913: Use Data.Bytestring for IO, not Data.Bytestring.Char8 > > This solution comes from Ian Lynagh, who points out that the > difference between the two is: > > Data.Bytestring.Char8 > --------------------- > writeFile :: FilePath -> ByteString -> IO () > writeFile f txt = bracket (openFile f WriteMode) hClose > (\h -> hPut h txt) > > Data.Bytestring > --------------- > writeFile :: FilePath -> ByteString -> IO () > writeFile f txt = bracket (openBinaryFile f WriteMode) hClose > (\h -> hPut h txt) > > We want this change because, as the System.IO docs say: > > On Windows, reading a file in text mode (which is the default) will > translate CRLF to LF, and writing will translate LF to CRLF. This is > usually what you want with text files. With binary files this is > undesirable; also, as usual under Microsoft operating systems, text > mode treats control-Z as EOF. Binary mode turns off all special > treatment of end-of-line and end-of-file characters. _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
