GetOpt formatting improvements
isaacdupree at charter.net
Wed Jul 2 06:40:09 EDT 2008
Brandon S. Allbery KF8NH wrote:
> On of the points of getopt is that -fFLAGS and -f FLAGS both work
> without any extra code. Standard getopt doesn't do optional arguments
> at all; GNU getopt handles -vn, -v n, and -v -- or -v -x (for random
> options -v, -x, the former taking an optional argument; the latter two
> cases are recognized as argument omitted).
and we say cabal uses a getopt equivalent to this? Yet it doesn't work
that way for me, in cabal-install 0.5.1:
> cabal fetch -v 3 random
cabal: Failed to parse package dependency: "3"
> cabal fetch -v3 random
Reading installed packages...
Reading available packages...
(which, incidentally, I was doing to try to find out why 'cabal fetch'
doesn't seem to do anything. And failed miserably. No messages, no new
directories in ~/.cabal/packages/hackage.haskell.org/ or in ./ ... Oh
wait, fetching uvector works. Maybe it's because GHC comes with
random-18.104.22.168 so cabal erroneously thinks it already has the source
code that I want to look at, i.e. "for later installation *or study*" as
`cabal --help` says?)
More information about the Libraries