Cabal package description sytax

Ross Paterson ross at soi.city.ac.uk
Mon Nov 29 04:50:25 EST 2004


On Sun, Nov 28, 2004 at 10:49:44PM -0800, isaac jones wrote:
> On Sat, Nov 27, 2004 at 03:04:00PM +0100, Sven Panne wrote:
> >  My problem in particular is that I want to use the values from
> > autoconf's AC_INIT (PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_BUGREPORT)
> > for
> > some package fields (name, version, maintainer), but the former have
> > double
> > quotes around them, while ghc-pkg either doesn't allow them (name,
> > version)
> > or includes the quotes into the value (maintainer).
> 
> I'm a little unclear about what you're looking for wrt the interaction
> between autoconf, cabal, and ghc-pkg.

There's an opportunity here to make another small extension to the
simple build infrastructure, namely to preprocess package descriptions
with cpp, possibly using header files generated by the configure step.
That would be enough for the simple build to handle packages like X11,
HGL, GLUT, OpenGL and OpenAL, where building is system-dependent.  Indeed
almost all of the packages in fptools/libraries could be handled this way.

It would help if (at least) the name, version and maintainer fields
allowed optional quotes as Sven suggests, so one could use the PACKAGE_*
defines straight from configure.  Also, the package description would need
a few more fields (extra-ld-opts, extra-cc-opts and extra-frameworks)
and a flag to say whether all Haskell sources should be preprocessed
with cpp.  It would also need to ignore blank lines (as GHC does),
because #if's tend to generate quite a few of them, and these are even
useful inside fields (e.g. module lists).  I realize that this conflicts
with the current stanza idea.


More information about the Libraries mailing list