Re: Remove Setup.hs, use Setup.lhs only

2006-11-30 Thread Simon Marlow
Ian Lynagh wrote: On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote: Ross Paterson <[EMAIL PROTECTED]> writes: On Wed, Nov 22, 2006 at 01:36:13AM +, 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.

Re: Remove Setup.hs, use Setup.lhs only

2006-11-29 Thread Ross Paterson
On Wed, Nov 29, 2006 at 03:32:52AM +, Duncan Coutts wrote: > On Tue, 2006-11-28 at 18:28 +, 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 defaultUserHo

Re: Remove Setup.hs, use Setup.lhs only

2006-11-28 Thread Duncan Coutts
On Tue, 2006-11-28 at 18:28 +, Ross Paterson wrote: > On Tue, Nov 28, 2006 at 12:28:56AM +, Duncan Coutts wrote: > > It's not clear to me that we need to have an extra field. I had > > originally envisaged that cabal-setup would just find the right compiler > > to build Setup.(l)hs and if

Re: Remove Setup.hs, use Setup.lhs only

2006-11-28 Thread Ian Lynagh
On Tue, Nov 28, 2006 at 06:28:35PM +, Ross Paterson wrote: > > > Can't the Simple/Custom distinction be simply if the Setup.(l)hs is > > present or not? > > If you have a field, cabal-setup can avoid compiling Setup.[l]hs in the > common cases. It would be nice to avoid allowing the possibil

Re: Remove Setup.hs, use Setup.lhs only

2006-11-28 Thread Ian Lynagh
On Tue, Nov 28, 2006 at 06:41:16PM +, Neil Mitchell wrote: > > Another advantage of not having a Setup.hs file is that you can't get > your machine taken over just by installing a package. The library > author would have to be much more creative. Only if cabal-setup uses defaultMain rather th

Re: Remove Setup.hs, use Setup.lhs only

2006-11-28 Thread Neil Mitchell
Hi In that sense, there's only one value (Custom), but defaultMain is common, and a reasonable number of packages use main = defaultMainWithHooks defaultUserHooks I had a value for Distribution.Make.defaultMain too (but I don't know if anyone uses that). > Can't the Simple/Custom dist

Re: Remove Setup.hs, use Setup.lhs only

2006-11-28 Thread Ross Paterson
On Tue, Nov 28, 2006 at 12:28:56AM +, Duncan Coutts wrote: > It's not clear to me that we need to have an extra field. I had > originally envisaged that cabal-setup would just find the right compiler > to build Setup.(l)hs and if there was none that it'd use defaultMain > (possibly without need

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Duncan Coutts
On Mon, 2006-11-27 at 15:06 -0800, Isaac Jones wrote: > >> Ross, how do you see the fields panning out? Want to implement it? :) > > > > Something like > > > > Build-Type: (Simple|Configure|Make|Custom) > > > > I'd be happy to implement it, if/when we get agreement. > > Cool. What do others

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Isaac Jones
Ross Paterson <[EMAIL PROTECTED]> writes: > On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote: >> So a summary of the new rules would be something like: >> >> * Setup.lhs will be found automatically, as it is now. >> >> * Setup.hs will be found and complained about with an error. Mayb

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Isaac Jones
Lemmih <[EMAIL PROTECTED]> writes: > On 11/27/06, Henning Thielemann <[EMAIL PROTECTED]> wrote: >> >> On Sat, 25 Nov 2006, Isaac Jones wrote: >> >> > I anticipate some objections, because some people _hate_ .lhs, but we >> > can see how it goes; in that case, they could always use the >> > user-su

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Ian Lynagh
On Sun, Nov 26, 2006 at 03:27:31PM -0800, Isaac Jones wrote: > > I see your point about layered tools needing to do a somewhat more > complex check for Setup.lhs. Really, layered tools should try to use > cabal-setup and let that tool handle finding the Setup file (or not) > but cabal-setup isn't

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Lemmih
On 11/27/06, Henning Thielemann <[EMAIL PROTECTED]> wrote: On Sat, 25 Nov 2006, Isaac Jones wrote: > I anticipate some objections, because some people _hate_ .lhs, but we > can see how it goes; in that case, they could always use the > user-supplied field to tell cabal layered tools to use the

Re: Remove Setup.hs, use Setup.lhs only

2006-11-27 Thread Henning Thielemann
On Sat, 25 Nov 2006, Isaac Jones wrote: > I anticipate some objections, because some people _hate_ .lhs, but we > can see how it goes; in that case, they could always use the > user-supplied field to tell cabal layered tools to use the > Setup.Foo.Hs or whatever the user wants. What about a sepa

Re: Remove Setup.hs, use Setup.lhs only

2006-11-26 Thread Ross Paterson
On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote: > So a summary of the new rules would be something like: > > * Setup.lhs will be found automatically, as it is now. > > * Setup.hs will be found and complained about with an error. Maybe in > the interim, we can have a warning. In t

Re: Remove Setup.hs, use Setup.lhs only

2006-11-26 Thread Isaac Jones
Ian Lynagh <[EMAIL PROTECTED]> writes: > On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote: >> Ross Paterson <[EMAIL PROTECTED]> writes: >> >> > On Wed, Nov 22, 2006 at 01:36:13AM +, Duncan Coutts wrote: >> >> Note that in future we intend to allow there being no Setup.(l)hs at all

Re: Remove Setup.hs, use Setup.lhs only

2006-11-25 Thread Ian Lynagh
On Sat, Nov 25, 2006 at 09:57:50AM -0800, Isaac Jones wrote: > Ross Paterson <[EMAIL PROTECTED]> writes: > > > On Wed, Nov 22, 2006 at 01:36:13AM +, 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 fi

Re: Remove Setup.hs, use Setup.lhs only

2006-11-25 Thread Isaac Jones
Ross Paterson <[EMAIL PROTECTED]> writes: > On Wed, Nov 22, 2006 at 01:36:13AM +, 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. > > C

Re: Remove Setup.hs, use Setup.lhs only

2006-11-22 Thread Ross Paterson
On Wed, Nov 22, 2006 at 01:36:13AM +, 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 descr

Re: Remove Setup.hs, use Setup.lhs only

2006-11-21 Thread Duncan Coutts
On Tue, 2006-11-21 at 18:43 +, Ian Lynagh wrote: > 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