Joachim Breitner <m...@joachim-breitner.de> added the comment:

Hi,

Am Freitag, den 17.09.2010, 08:07 +0000 schrieb Eric Kow:
> Eric Kow <ko...@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: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/
  Debian Developer: nome...@debian.org

__________________________________
Darcs bug tracker <b...@darcs.net>
<http://bugs.darcs.net/patch400>
__________________________________
_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to