RE: ghc-pkg/Cabal list syntax
"Simon Marlow" <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.fptools |
|---|---|
| Message-ID | <3429668D0E777A499EE74A7952C382D1032E6654@EUR-MSG-01.europe.corp.microsoft.com> |
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? 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 - use listField rather than simpleField to parse ld-options and cc-options. Also, options should be allowed to be quoted, so we need to introduce parseOptionQ. InstalledPackageInfo uses parseFilePathQ for these fields which is wrong. Cheers, Simon