Changes in PostHooks
ijones at syntaxpolice.org
Wed Feb 9 16:18:16 EST 2005
Ross Paterson <ross at soi.city.ac.uk> writes:
> On Tue, Feb 01, 2005 at 02:39:51PM +0200, Krasimir Angelov wrote:
>> I would like to do some checks in the cabalized HSQL during configure
>> phase. In order to do this I need to know where GHC is installed. I
>> decided to do this in the postConf hook but I have slightly changed
>> Hooks API. The types of all post hooks are:
>> Args -> LocalBuildInfo -> IO ExitCode
>> It seems like no one is using post hooks at this time so I think that
>> it is safe to do this change. Thoughts?
> With defaultUserHooks it would also be useful to pass the stuff in
> LocalBuildInfo to the configure script. Moreover the contents of
> <package>.buildinfo aren't really used until the later stages.
> So really we want
> postConf :: Args -> ConfigFlags -> LocalBuildInfo -> IO ExitCode
> and we don't need preConf or the postX where X /= Conf.
I think that there are probably reasons folks would like to have the
postX hooks. They allow customization of each command without copying
the entire Distribution.Simple module. Glad to hear that the fptools
libraries don't need anything besides postConf, though.
> YAGNI, I say.
I don't know this one.
More information about the Libraries