Remove Setup.hs, use Setup.lhs only

Ross Paterson ross at soi.city.ac.uk
Wed Nov 29 10:22:39 EST 2006


On Wed, Nov 29, 2006 at 03:32:52AM +0000, Duncan Coutts wrote:
> On Tue, 2006-11-28 at 18:28 +0000, Ross Paterson wrote: 
> > In that sense, there's only one value (Custom), but defaultMain is
> > common, and a reasonable number of packages use
> > 
> > 	main = defaultMainWithHooks defaultUserHooks
> 
> which (bizarrely) is not the same as defaultMainWithHooks
> defaultUserHooks, though it really should be.

Fair enough, but for this discussion the point is that whatever they're
called, there are two of them (three if you count Make).

> Oh you mean that since people would want to be backwards compatible that
> they would include a simple Setup.hs and then we loose the advantage of
> not having to compile Setup.hs and thus having an extra field to say to
> use simple even if there is a Setup.hs present is a benefit?
> 
> Yes, it is a benefit but it seems rather marginal to me. Remember that
> we can't always avoid building a trivial Setup.hs anyway, since in the
> case that cabal-setup was built with Cabal-x.y and the .cabal requests
> cabal version x.y+1 then cabal-setup needs to build Setup.hs with the
> later version of the Cabal lib and use that.

Yes we do, and even if Setup.hs wasn't present.  But this will be rare,
especially if one keeps cabal-setup up to date.  The idea is to get the
benefit most of the time, though not all.



More information about the cabal-devel mailing list