Re: [Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?
On Thu, 2008-08-14 at 22:32 -0400, Nicholas Andrews wrote: Hi! I'm trying to set up a project with both src and lib directories with cabal. My blah.cabal file looks like: Library Build-Depends: base Exposed-Modules:Foo hs-source-dirs: lib/foo Executable hai Build-depends: base Main-is:Bar.hs ghc-options:-O hs-source-dirs: src/bar Other-Modules: Foo extra-libraries:Foo extra-lib-dirs: lib/bar You will have to use: Library Build-Depends: base Exposed-Modules:Foo hs-source-dirs: lib/foo Executable hai Build-depends: base Main-is:Bar.hs hs-source-dirs: src/bar, lib/bar Other-Modules: Foo Theo only downside is that the module Foo will be built twice. What's wrong? Currently there is no way for the hai executable to use build-depends: blah, (though that's the obvious way in future that we could let an exe depend on a lib in the same package). See: http://hackage.haskell.org/trac/hackage/ticket/89 http://hackage.haskell.org/trac/hackage/ticket/276 Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?
Sorry, I meant runhaskell Setup.hs configure|build. To clarify, I DO have a Setup.hs, and am getting the error in my original post when running it. On Fri, Aug 15, 2008 at 1:42 AM, Ketil Malde [EMAIL PROTECTED] wrote: Nicholas Andrews [EMAIL PROTECTED] writes: $ runhaskell blah.cabal configure blah.cabal isn't a Haskell file, you need a file Setup.hs that you can 'runhaskell'. Setup.hs need only contain the following three lines: #!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?
Hi! I'm trying to set up a project with both src and lib directories with cabal. My blah.cabal file looks like: Library Build-Depends: base Exposed-Modules:Foo hs-source-dirs: lib/foo Executable hai Build-depends: base Main-is:Bar.hs ghc-options:-O hs-source-dirs: src/bar Other-Modules: Foo extra-libraries:Foo extra-lib-dirs: lib/bar But I get: $ runhaskell blah.cabal configure $ runhaskell blah.cabal build src/bar/Bar.hs:6:7: Could not find module `Foo': Use -v to see a list of the files... In Bar.hs, line 6 says import Svm What's wrong? Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?
Nicholas Andrews [EMAIL PROTECTED] writes: $ runhaskell blah.cabal configure blah.cabal isn't a Haskell file, you need a file Setup.hs that you can 'runhaskell'. Setup.hs need only contain the following three lines: #!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe