Hi,
Am Freitag, den 17.09.2010, 08:07 +0000 schrieb Eric Kow:
> Eric Kow <kowey@darcs.net> added the comment:
>
> On Thu, Sep 16, 2010 at 18:11:17 +0000, Joachim Breitner wrote:
> > subusage :: DarcsCommand -> String
> > subusage super =
> > (usageInfo
> > - - ("Usage: darcs "++commandName super++" SUBCOMMAND ... " ++
> > + ("Usage: " ++ commandProgramName super ++ " "++commandName super++" SUBCOMMAND ... " ++
>
> Quick screening question. Wouldn't it be simpler for subusage
> to have access to the result of System.Environment.getProgramName?
no, because
a) It is in IO
b) There might be reasons to toss around commands for other programs.
Assume you would, for some reason, have a suite of darcs related
programs, and want to generate manpages for all of them in one place.
Then being able to handle DarcsCommands of different executables would
help.
b) is quite hypothetical, but a) is a selling point IMHO :-)
Greetings,
Joachim
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
|