[Haskell-cafe] two problems with Data.Binary and Data.ByteString

Tim Newsham newsham at lava.net
Tue Aug 12 21:44:01 EDT 2008

> I'm starting to wonder if this isn't an issue with
> Data.ByteString.Lazy.Char8.{read,write}File.

This simple test case fails:

   module Main where
   import qualified Data.ByteString.Lazy.Char8 as B
   main = do
       print =<< B.readFile "xxx"
       B.writeFile "xxx" =<< B.readFile "test.hs"

If you replace B.readFile with readFile and B.writeFile with writeFile
it works properly.  ByteString bug?

Tim Newsham

More information about the Haskell-Cafe mailing list