patch applied (cabal): Stop having hooks return an ExitCode
that we then ignore
igloo at earth.li
Sat Jun 23 13:25:07 EDT 2007
On Sat, Jun 23, 2007 at 02:08:20PM +0200, Sven Panne wrote:
> [ I've been quite busy in the last few months, so perhaps I've missed some
> discussions on the relevant mailing lists. ]
> On Wednesday 18 April 2007 05:53, Duncan Coutts wrote:
> > Tue Apr 17 15:56:57 PDT 2007 Ian Lynagh <igloo at earth.li>
> > * Stop having hooks return an ExitCode that we then ignore
> > M ./Distribution/Simple.hs -36 +28
> Hmmm, what is the intention behind this patch? Is it *really* necessary (apart
> from aesthetic reasons)?
No, apart from the fact that anyone using it would doubtless be confused
by the old API, there is no strict need to change.
However, we decided that it was best to fix the design now, while we
were making other changes to the API and while there are relatively few
libraries using it, than be stuck with the poor design forever.
Note that most of the hooks that used to return ExitCode are actually up
for removal, as described in the links in
The high priority bugs on
(the yellow block at the top) are all the bugs (and features etc) that
we may want to fix that could mean API changes; the aim is to get as
many of these as possible done (or rejected) by the GHC 6.8 release, in
the hope that the API will stabilise thereafter.
> I hope there is a very good technical reason to
> change such a public API. This breaks a few Setup scripts, and currently I
> can't see a way to fix the Setup scripts
Something like this ought to do it:
myHook = do ...
class Done a where
done :: a
instance Done () where
done = ()
instance Done ExitCode where
done = ExitSuccess
More information about the Cvs-libraries