Hi, 

I have a library that has some modules written as .hsc files and I want to include some executables that use those modules. Cabal doesn't seem to find the modules when it is building the executable. It complains that the module used by the executable is in a hidden package (of the same name as the package being built). Adding the package as a dependency in the executable section doesn't work since it references a library defined in the same package.  Is this a bug?   I've attached three files illustrating the problem. A.hsc is a tiny module in the library, B.hs is the executable that uses A, foo.cabal defines both the library and the executable. I am using 

$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library 

and when I run "cabal install -v" I get

$ cabal install --disable-library-profiling 
Resolving dependencies...
Configuring foo-1.0...
Building foo-1.0...
Preprocessing library foo-1.0...
[1 of 1] Compiling A                ( dist/build/A.hs, dist/build/A.o )
In-place registering foo-1.0...
Preprocessing executable 'B' for foo-1.0...

B.hs:3:8:
    Could not find module `A'
    It is a member of the hidden package `foo-1.0'.
    Perhaps you need to add `foo' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
Failed to install foo-1.0
cabal: Error: some packages failed to install:
foo-1.0 failed during the building phase. The exception was:
ExitFailure 1