[darcs-users] darcs patch: add suggested fix to readFile policy war... (and 1 more)
simon at joyful.com
Thu Feb 12 20:20:43 UTC 2009
Eric Kow wrote:
> Whoops! Looks like you just crossed patches with Petr
Yes. We have been chatting as I worked on this for the last 2.5 hours so
I'm surprised he didn't mention it. :)
>> + "Prelude.readFile doesn't ensure the file is closed before it is deleted!\nConsider import Data.ByteString.Char8 as B (readFile), B.readFile instead." \
> I'm not sure I buy this explanation.
I haven't been able to understand the explanation of the problem either.
But I believe it arises because Prelude.readFile is lazy.
Data.ByteString's is strict which presumably removes the issue. I think
applying this patch is better than applying not patch as it helps folks
comply with the policy and move on.
More information about the darcs-users