[darcs-devel] darcs patch: Avoid putting a wrongly-named directory in dist tarball

David Roundy droundy at darcs.net
Mon Nov 7 04:57:10 PST 2005


On Sun, Nov 06, 2005 at 05:29:57PM +0000, Simon McVittie wrote:
> The attached patch produces the expected output by creating a directory
> $TMPDIR/darcsdist (or $TMPDIR/darcsdist-1, etc.) and creating the
> exported directory inside that. I am not a Haskell programmer, so my
> alteration could probably do with some refactoring from someone who
> knows what they're doing.

Looks good! I'm a bit curious as to how hard you found it to read the
Haskell and figure out how to modify it? I've been using Haskell long
enough now that that I can hardly remember when it was new to me, but an
office-mate recently took a look at a bit of darcs' code, and declared that
Haskell's syntax was incomprehensible...

The only oddity in your patch was a set of unneeded parentheses in
"setCurrentDirectory (tmpdir)", which isn't really a problem, but most
likely just reflects your unlispish view of a function as f(x) not (f x).
It would be nice to avoid going into tmpdir and back out again, but off the
top of my head I can't see how to do that with the primitives we've got,
and making withTempDir chdir into the directory is usually a bonus.
-- 
David Roundy
http://www.darcs.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20051107/d4ad9508/attachment.pgp


More information about the darcs-devel mailing list