Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/22/10 09:44 , Magnus Therning wrote: All right, so why would cabal want to avoid compiling the Setup.hs? Of course this behaviour of cabal's means that I in the future will use *Custom* all the time, since I otherwise have to remember this

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Magnus Therning
On Fri, Jul 23, 2010 at 03:33, wren ng thornton w...@freegeek.org wrote: Magnus Therning wrote: On Thu, Jul 22, 2010 at 11:52, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Magnus Therning
On Fri, Jul 23, 2010 at 04:58, Mark Wotton mwot...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:33 PM, wren ng thornton w...@freegeek.org wrote: Magnus Therning wrote: On Thu, Jul 22, 2010 at 11:52, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus

RE: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Sittampalam, Ganesh
Mark Wotton wrote: Perhaps cabal should print a warning if you have a Setup.hs file, _and_ try to use Simple? It'd at least give the hint that they're unhappy together. I think it should instead verify that Setup.hs is consistent with a Simple build. I don't know how much variation exists,

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
That actually runs contrary to one of cabal's other practices, which is to add a 'simple' Setup.hs to your package as it makes the sdist is one is not present. With your proposed change, it would then complain about _every_ package that used simple. ;) Setup.hs exists so that you can execute

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
On Fri, Jul 23, 2010 at 8:07 AM, Edward Kmett ekm...@gmail.com wrote: That actually runs contrary to one of cabal's other practices, which is to add a 'simple' Setup.hs to your package as it makes the sdist is one is not present. er.. I meant if one is not present.

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Magnus Therning
On Wed, Jul 21, 2010 at 17:43, Rogan Creswick cresw...@gmail.com wrote: On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    Build-Type    : Simple and my main in Setup.hs looks like this:    

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Ross Paterson
On Wed, Jul 21, 2010 at 09:43:16AM -0700, Rogan Creswick wrote: On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    Build-Type    : Simple I've been unable to reproduce this -- flipping the

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Magnus Therning
On Thu, Jul 22, 2010 at 10:59, Ross Paterson r...@soi.city.ac.uk wrote: On Wed, Jul 21, 2010 at 09:43:16AM -0700, Rogan Creswick wrote: On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Ross Paterson
On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson r...@soi.city.ac.uk wrote: Magnus is building by directly running the Setup.hs himself, which ignores the Build-Type.  To get cabal-install to use his Setup.hs, the Build-Type must

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Magnus Therning
On Thu, Jul 22, 2010 at 11:52, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson r...@soi.city.ac.uk wrote: Magnus is building by directly running the Setup.hs himself, which ignores the

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread wren ng thornton
Magnus Therning wrote: On Thu, Jul 22, 2010 at 11:52, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson r...@soi.city.ac.uk wrote: Magnus is building by directly running the Setup.hs himself,

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Mark Wotton
On Fri, Jul 23, 2010 at 12:33 PM, wren ng thornton w...@freegeek.org wrote: Magnus Therning wrote: On Thu, Jul 22, 2010 at 11:52, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-21 Thread Magnus Therning
On Wed, Jul 21, 2010 at 04:53, Rogan Creswick cresw...@gmail.com wrote: On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins tomahawk...@gmail.com wrote: Thanks.  I tried this, but it appears cabal-install ignores the Setup.hs file.  The only way I could get it to take is if I run 'runhaskell

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-21 Thread Rogan Creswick
On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    Build-Type    : Simple and my main in Setup.hs looks like this:    main = defaultMainWithHooks $ simpleUserHooks        { cleanHook =

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-20 Thread Tom Hawkins
On Mon, Jul 19, 2010 at 11:54 AM, Stephen Tetley stephen.tet...@gmail.com wrote: Hi Tom This will the job for a UserHooks - probably preBuild? - see Distribution.Simple.UserHooks. postConf - Hook to run after configure command preBuild - Hook to run before build command. Second arg

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-20 Thread Rogan Creswick
On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins tomahawk...@gmail.com wrote: Thanks.  I tried this, but it appears cabal-install ignores the Setup.hs file.  The only way I could get it to take is if I run 'runhaskell Setup.hs configure' directly.  I always assumed cabal-install runs Setup.hs

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-19 Thread Stephen Tetley
Hi Tom This will the job for a UserHooks - probably preBuild? - see Distribution.Simple.UserHooks. postConf - Hook to run after configure command preBuild - Hook to run before build command. Second arg indicates verbosity level. buildHook - Over-ride this hook to get different behaviour during