cabal hooks interface
Ross Paterson
ross at soi.city.ac.uk
Thu Dec 23 13:20:18 EST 2004
On Thu, Dec 23, 2004 at 01:56:35AM -0500, Isaac Jones wrote:
> This is indeed very cool. Much of this should probably just be
> integrated into the Distribution.Simple stuff for Hugs.
It will require some changes: the extra fields I mentioned, plus some
complications in the preprocessing.
> I think the only sticking point is whether we have one file or two,
> the description verses the build info.
If a package requires system-dependent parameters, there will surely
be two hunks of information from the author's viewpoint: the file
Setup.description (which you want in the source bundle for use by the
other tools) and something else for the build information. No one will
want to repeat all the information in Setup.description in that other
thing, so it will need different handling. The question is whether that
should be reflected by the interface.
Also, since you're writing code to read (and presumably to save)
the output of preConf, if you moved this persistency handling inside
defaultMainWorker you could simplify the interface: the other hooks
wouldn't need to return anything.
> It looks like you use the params to configure, so maybe the hook
> functions need to take the flags for each param as input or something.
> Hmmmm.
Well, the preConf would, but maybe that's different from the others.
More information about the Libraries
mailing list