[darcs-devel] Action/Command layer in between Repository and UI

Ben Franksen ben.franksen at online.de
Mon Mar 29 09:59:30 UTC 2021


>> Am 27.03.21 um 22:43 schrieb Ganesh Sittampalam:
> I think there are actually be two different concepts here.
> 
> Firstly, there's running hooks/tests. Those are fairly self-contained
> operations, probably intrinsically in IO, that interact with the machine
> rather than with the user. That was the kind of thing I was thinking
> about being in Darcs.Action.
> [...]
> That said the Darcs.Action layer actually looks like a very small amount
> of code. So maybe it just needs a home without spending much time
> thinking about it.

It is not only very little code, it is also almost exclusively concerned
with what to print to the console depending on verbosity flags and the
return code of the hook or test in question. The only thing not strictly
belonging to UI are the calls to 'getPrefval' and 'system'. I don't
think a new Action layer makes sense for two one-line procedure calls.

Cheers
Ben
-- 
I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman




More information about the darcs-devel mailing list