[darcs-users] darcs patch: add suggested fix to readFile policy war... (and 1 more)

Eric Kow kowey at darcs.net
Thu Feb 12 20:07:18 UTC 2009


Whoops! Looks like you just crossed patches with Petr

> Thu Feb 12 10:32:55 PST 2009  Simon Michael <simon at joyful.com>
>   * add suggested fix to readFile policy warning
> 
> Thu Feb 12 11:40:29 PST 2009  Simon Michael <simon at joyful.com>
>   * ShowAuthor code cleanups and fix two warnings and a policy test failure

add suggested fix to readFile policy warning
--------------------------------------------
> Simon Michael <simon at joyful.com>**20090212183255
>  Ignore-this: f8430012bbc4113a5e6b17c22409b59f
> ] hunk ./tests/haskell_policy.sh 28
> -        "readFile doesn't ensure the file is closed before it is deleted!" \
> +        "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 do see this in the haskell policy file:

 B # importing readFile from Data.ByteString as B, is allowed

but it's not much of an explanation.  Why is this allowed when the
Prelude.readFile is not?  I have a sneaking suspicion this exception
was just thrown in to make haskell_policy shut up :-P

Can somebody explain this to me?  Otherwise, to avoid people wrongly
thinking that the solution to the readFile issue is just to use
B.readFile, I'm not going to apply this patch.

ShowAuthor code cleanups and fix two warnings and a policy test failure
-----------------------------------------------------------------------
See above (and also Petr's already ratified your readFile, and his
ratification seems to make sense to me)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090212/2a659687/attachment.pgp>


More information about the darcs-users mailing list