[darcs-devel] Add --show-external?

David Roundy droundy at darcs.net
Tue Dec 12 09:46:08 PST 2006


On Tue, Dec 12, 2006 at 03:44:00PM +0100, Juliusz Chroboczek wrote:
> > Should we add a flag --show-external that dumps the external commands?
> > I started to do this, but it means propagating [DarcsFlag] all over
> > the place, and the patch is going to be pretty big.  Does anyone
> > object to this?  In GHC when we have to propagate a flag everywhere we
> > sometimes resort to a top-level unsafePerformIO instead (since the
> > flag is always constant for a given run of darcs, this isn't so bad).
> 
> I'd vote for either the imperative global, or an environment variable
> accessed from foreign code, as is done with DARCS_SLOPPY_LOCKS.

I don't object to making [DarcsFlag] global, but for this purpose I think
an environment variable would be the way to go.  It's something of a
debugging trick, so making it not immediately obvious shouldn't hurt new
users, and then we have one less flag (or rather, don't have one more flag)
with which to burden every darcs command.

I also don't really mind propogating [DarcsFlag] all over the place.  It
does make it explicit which code may be affected by the flags, which is at
times a nice hint, particularly when something unexpected happens.
-- 
David Roundy
Department of Physics
Oregon State University




More information about the darcs-devel mailing list