[darcs-devel] darcs patch: Simplify writeHashFile function. (and 2 more)
David Roundy
droundy at darcs.net
Wed Oct 31 14:13:14 UTC 2007
On Tue, Oct 30, 2007 at 11:55:20PM +0100, Eric Kow wrote:
> Some miscellaneous results of our issue553 debugging with David. My
> implementation of David's Workaround-enforcement idea is to make it so that you
> have to import the functions qualified. This is a little bit icky, but it does
> have the extra benefit of making us extra-conscious where our code comes from.
>
> I'd send the rest of it (actually using the enforcement) after my issue298
> stuff goes in, as it will depend on it. No point adding junk to the bundle.
>
> Tue Oct 30 21:42:56 CET 2007 Eric Kow <eric.kow at gmail.com>
> * Simplify writeHashFile function.
>
> Tue Oct 30 23:28:55 CET 2007 Eric Kow <eric.kow at gmail.com>
> * Modernise and enhance buggy renameFile workaround.
>
> Use the hierarchical library structure.
> Catch only 'does not exist' errors, passing everything else up.
>
> Tue Oct 30 23:49:59 CET 2007 Eric Kow <eric.kow at gmail.com>
> * Add ability to enforce use of Workaround functions.
This all looks good. I haven't reviewed the last bit of code for
correctness, because it's a bit daunting. I wonder if we should switch to
some sort of ghc-api or haskell parser for the policy checking? I don't
relish the idea of searching for import statements in shell.
Note also that we should disallow blanket imports of dangerous modules
(e.g. import System.Directory should be an error).
--
David Roundy
Department of Physics
Oregon State University
More information about the darcs-devel
mailing list