Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-02 Thread Simon Marlow
Duncan Coutts wrote: On Tue, 2007-05-01 at 22:29 +0100, Magnus Therning wrote: So if foo.hs is in test-src and Foo/Bar.hs is in src then I think you just need: hs-source-dirs: test-src, src No, that's not enough, I also have to add the following lines to make the executable compile and link:

Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-02 Thread Magnus Therning
On Wed, May 02, 2007 at 10:08:41 +0100, Simon Marlow wrote: [..] IMO we shouldn't allow both a library and an exe in the same package. I think I argued against this originally, and my understanding is that doing this is deprecated, although perhaps not visibly enough. Whenever the question of what

Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-02 Thread R Hayes
I think Simon is right, and not just from a Haskell point of view. Allowing a package to contain a both a library and an executable makes the behavior of the package system less obvious. That's not to say that it can't behave correctly, but that it can't behave both correctly and in a

[Haskell-cafe] Cabal, lib and exe in one

2007-05-01 Thread Magnus Therning
I'm trying to create a single cabal file containing specs for both a library and an executable using that library. I'm not having much luck though :( This is what I have so far: name: foo version: 0.1 exposed-modules: Foo.Bar other-modules: Foo.Qux Foo.C2HS hs-source-dirs: src

Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-01 Thread Duncan Coutts
On Tue, 2007-05-01 at 09:34 +0100, Magnus Therning wrote: I'm trying to create a single cabal file containing specs for both a library and an executable using that library. I'm not having much luck though :( This is what I have so far: name: foo version: 0.1 exposed-modules:

Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-01 Thread Magnus Therning
On Tue, May 01, 2007 at 12:02:18 +0100, Duncan Coutts wrote: On Tue, 2007-05-01 at 09:34 +0100, Magnus Therning wrote: I'm trying to create a single cabal file containing specs for both a library and an executable using that library. I'm not having much luck though :( This is what I have so

Re: [Haskell-cafe] Cabal, lib and exe in one

2007-05-01 Thread Duncan Coutts
On Tue, 2007-05-01 at 22:29 +0100, Magnus Therning wrote: So if foo.hs is in test-src and Foo/Bar.hs is in src then I think you just need: hs-source-dirs: test-src, src No, that's not enough, I also have to add the following lines to make the executable compile and link: extensions: