Remove Setup.hs, use Setup.lhs only

Ian Lynagh igloo at
Sat Nov 25 20:09:55 EST 2006

On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote:
> Ross Paterson <ross at> writes:
> > On Wed, Nov 22, 2006 at 01:36:13AM +0000, Duncan Coutts wrote:
> >> Note that in future we intend to allow there being no Setup.(l)hs at all
> >> when using cabal-setup. No Setup.(l)hs file would be equivalent to the
> >> basic one that uses defaultMain.
> >
> > Could we have an optional field in the package description to tell
> > cabal-setup which setup to use?  There could be tokens representing
> >
> > 	main = Distribution.Simple.defaultMain
> > 	main = Distribution.Simple.defaultMainWithHooks defaultUserHooks
> > 	main = Distribution.Make.defaultMain
> Since we've decided to go with making Setup.[l]hs optional, I agree

What's the advantage of making it optional, especially now we have
mkcabal to make the defaultMain Setup.lhs for us? It would be much
simpler, IMO, if it was the case that all cabal packages have a
Setup.lhs file.

As we need to support the presence of a Setup.lhs, no tool can be made
simpler by allowing it to be absent (and many will need a little extra
complexity to cope), and the only saving is a tiny amount of compilation
for one (admittedly common) case.


More information about the cabal-devel mailing list