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

Isaac Jones ijones at
Sun Jan 9 15:03:04 EST 2005

Sven Panne <Sven.Panne at> writes:

> In the cvs-libraries list Isaac Jones wrote:
>> 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). [...]
> As the author of the "non-beautiful" GetOpt, :-) I would happily accept
> any backwards-compatible improvements/additions to that module. Any
> suggestions? What would help to implement Cabal?

I was being silly, it's quite beautiful... The problem is that I want
it to allow options that it doesn't know how to parse, and allow me to
throw errors later, but most people don't want that...

We could add another function "getOptSloppy" or something that allows
this, but the problem is that my changes impact most of the system, if
in a small way.

That said, I'll work on a backward-compatible change.



More information about the Libraries mailing list