cvs commit: fptools/libraries/Cabal/Distribution GetOpt.hs Setup.hs Simple.hs

Isaac Jones ijones at haskell.org
Thu Jan 6 02:42:11 EST 2005


ijones      2005/01/05 23:42:11 PST

  Modified files:
    libraries/Cabal/Distribution Setup.hs Simple.hs 
  Added files:
    libraries/Cabal/Distribution GetOpt.hs 
  Log:
  fixed checking for unknown args
  Long story:
  
  It seems that Marvin removed my beautiful and powerful "getOpt"
  alterations to use the System.Console one, which I had already deemed
  to be non-beautiful because of the errors it spews when faced with
  arguments it doesn't understand.
  
  I think Marvin misunderstood the API docs that seem to suggest that
  the "commands" that get passed back from getOpt are the non-matched
  arguments.  In fact, non-matched arguments get returned as errors
  (ewwwww).
  
  So I had to re-apply my GetOpt module, and alter the parser
  accordingly.
  
  Also, since it's not OK to pass random arguments all the time (just
  when you have user hooks), I cleaned up calls to no_extra_flags to
  only get called when there's nothing sensible to do with unknown
  arguments.
  
  Revision  Changes    Path
  1.7       +27 -17    fptools/libraries/Cabal/Distribution/Setup.hs
  1.14      +19 -19    fptools/libraries/Cabal/Distribution/Simple.hs


More information about the Cvs-libraries mailing list