darcs patch: fix #1839, #1463, by supporting ghc-pkg bulkqueries with substring matching

Claus Reinke claus.reinke at talk21.com
Thu Nov 15 10:49:25 EST 2007


>> Wouldn't * be more conventional than .?  * means "any substring" in 
>> filename globbing, so most people will be familiar with that usage.  I 
>> suppose it would have to be quoted, but I'd pay that penalty.  Anyone else 
>> have any thoughts?

that was my first tendency as well, but unfortunately, the
quoting penalty is too high, at least when going through
ghc-pkg-inplace on windows:
 
in cmd.exe, this works:

    .\ghc-pkg-inplace list "*"

but, in cygwin's bash, i haven't yet found a combination 
that avoids expansion of an isolated '*' and still does the
job. in particular,

    ./ghc-pkg-inplace list '*'

does not work (will be expanded, leading to ghc-pkg
error message), and i need at least this

    $ ./ghc-pkg-inplace list \\\\*
    ["list","\\\\*"]
    c:/fptools/ghc/driver/package.conf.inplace:

to even get past the ghc-pkg error message, but then 
there is of course no match left.

but that does seem to be a bug in ghc-pkg-inplace.hs,
so perhaps that should be fixed first, and then we could 
use '*' instead of '.' (even though it isn't full globbing, 
'*' is only interpreted at string ends).

claus




More information about the Cvs-ghc mailing list