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

2010-07-23 Thread Edward Kmett
On Fri, Jul 23, 2010 at 8:07 AM, Edward Kmett 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-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 runha

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 Magnus Therning
On Fri, Jul 23, 2010 at 04:58, Mark Wotton wrote: > On Fri, Jul 23, 2010 at 12:33 PM, wren ng thornton wrote: >> Magnus Therning wrote: >>> >>> On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: > > On Thu, Jul 2

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

2010-07-23 Thread Magnus Therning
On Fri, Jul 23, 2010 at 03:33, wren ng thornton wrote: > Magnus Therning wrote: >> >> On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: >>> >>> On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson wrote: > > Magnus

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

2010-07-22 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

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 wrote: > Magnus Therning wrote: >> >> On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: >>> >>> On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson wrote: > > Mag

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 wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson wrote: Magnus is building by directly running the Setup.hs himself, which ignores the Build-Type. To get c

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

2010-07-22 Thread Magnus Therning
On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: > On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: >> On Thu, Jul 22, 2010 at 10:59, Ross Paterson wrote: >> > Magnus is building by directly running the Setup.hs himself, which ignores >> > the Build-Type.  To get cabal-install

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 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 be set to Cus

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

2010-07-22 Thread Magnus Therning
On Thu, Jul 22, 2010 at 10:59, Ross Paterson 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 wrote: >> > I am successfully using hooks with the following in my .cabal file: >> > >> >    Build-Type    : Simple >> >> I've

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 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 build type to

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

2010-07-22 Thread Magnus Therning
On Wed, Jul 21, 2010 at 17:43, Rogan Creswick wrote: > On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning 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 = defaultMainWithHo

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

2010-07-21 Thread Rogan Creswick
On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning 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 = profileClean >    

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

2010-07-21 Thread Magnus Therning
On Wed, Jul 21, 2010 at 04:53, Rogan Creswick wrote: > On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins 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 alway

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

2010-07-20 Thread Rogan Creswick
On Tue, Jul 20, 2010 at 8:50 PM, Tom Hawkins 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 under the hood, but

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

2010-07-20 Thread Tom Hawkins
On Mon, Jul 19, 2010 at 11:54 AM, Stephen Tetley 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 indicates > verbosity leve

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 bu

[Haskell-cafe] cabal, Setup.lhs example

2010-07-19 Thread Tom Hawkins
I have a script I'm using to generate some Haskell code for a library. How do I specify this flow in the cabal setup file? Would someone point me to a relevant library I can reference as an example? -Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haske