[darcs-users] [patch259] Make test default more explicit. (and 1 more)

Eric Kow kowey at darcs.net
Wed Jun 2 20:42:13 UTC 2010

Make test default more explicit.
> +data WantTest = WantTest | WantNoTest

It occurred to me on the walk home that here actually, it probably
doesn't make any sense to re-invent Bool.  It was a good idea in lots of
other cases because it avoided passing around a lot of meaningless
looking identical Bools, but since there's little risk of this
happening, it seems like the wantTest function should just return Bool.

> + case wantTest opts of
> +   WantNoTest -> return ()
> +   WantTest   -> withCurrentDirectory dir $

In any case, my more general point was that the default values of flags
should not be buried deep down in the Darcs.Repository level, but should
be closer to the surface so that (A) we can just flip a default without
worrying about breaking some obscure part of the code and (B) we always
know what the defaults are without having to dig through the code.

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: 195 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100602/e5a7db1c/attachment.pgp>

More information about the darcs-users mailing list