Remove Setup.hs, use Setup.lhs only

Ian Lynagh igloo at earth.li
Tue Nov 21 13:43:31 EST 2006


[forwarding this manually as the BTS doesn't send to a mailing list;
 the bug is at http://hackage.haskell.org/trac/hackage/ticket/100 ]


I'm not sure if this should be a bug(enhancement) report or on the
mailing list, but I've gone with putting it here so that it won't be
accidentally forgotten about.

Allowing both Setup.hs and Setup.lhs causes minor annoyances all over
the place when working with cabal packages, and moreso when writing
tools to work with cabal packages.

There are also a couple of larger problems I've had. For example, when
writing a Makefile that builds all cabal packages in subdirectories
(i.e. (re)make setup if necessary, configure and build) it is hard (for
me at least!) to tell make "setup depends on whichever of Setup.hs and
Setup.lhs exists".

The benefits of allowing Setup.hs are small. For the common case you
only save a couple of copies of > , while for larger Setup.lhs files
\begin{code} and \end{code} at the start and end is not significant
overhead.

The reason for choosing to keep Setup.lhs over Setup.hs is so that we
can use #! scripts etc without having to worry about the Haskell impl
trying to parse it.

Thus I would like to propose dropping support for Setup.hs and
supporting Setup.lhs only. It would probably be necessary for cabal to
complain if it finds a Setup.hs file, as otherwise people wouldn't
notice they hadn't updated their packages.


Thanks
Ian



More information about the cabal-devel mailing list