[Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?

Nicholas Andrews noandrews at gmail.com
Thu Aug 14 22:32:43 EDT 2008


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!


More information about the Haskell-Cafe mailing list