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 [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
