[moving to cvs-libraries from some list I'm not subscribed to]

Simon Marlow wrote:
> On 18 February 2005 08:44, Sven Panne wrote:
> > The syntax of different tools is a bit inconsistent: In the
> > BLAH.buildinfo files, the values of e.g. ld-options are
> > space-separated (but not most other list-valued entries in
> > BLAH.cabal). "ghc-pkg describe" lists these as exta-ld-opts (why a
> > different name here?), and these are *comma*-separated. I think this
> > should be cleaned up a little bit.
> >
> > And while we are at syntax: Regardless of the list separator, we
> > should be able to include it into the values of the list elements,
> > e.g. via "" or '' like shells.
> > The "space" behaviour ;-) of the Cabal syntax is a bit unclear to me
> > in general
> > and seems to be rather ad-hoc...
>
> Fair points.  Actually I don't like the comma syntax of the list fields
> at all: the commas are superfluous, and it just makes it harder to
> splice things in using preprocessing.  It might be too late to change
> this though - thoughts anyone?

The splicing problem is exactly why these fields are space-separated.

I was going to suggest (later) that we make both commas and quoting
optional for all lists.  If we're doing it pre-6.4, ditching commas
altogether could be a possibility.

> In any case, I propose we:

>  - change extra-ld-opts and extra-cc-opts in InstalledPackageInfo
>    to be ld-options and cc-options for consistency with BuildInfo

Similarly extra-frameworks.  Should extra-libs and extra-lib-dirs also
lose the prefix (and expand a bit)?

If you're changing InstalledPackageInfo, you probably also want to add
synopsis and license-file.

>  - use listField rather than simpleField to parse ld-options and
>    cc-options.

Having commas there would make the configure-based scheme much more
painful.

>                 Also, options should be allowed to be quoted, so
>    we need to introduce parseOptionQ.  InstalledPackageInfo uses
>    parseFilePathQ for these fields which is wrong.

In general, the parsing of quotes needs to be different from just the
unquoted thing wrapped in quotes (e.g. filenames), and something clever
needs to happen on output, too.
_______________________________________________
Cvs-libraries mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to