This should work since Cabal-1.14. Can you show, how exactly you added the dependency to the executable?
On Mon, 25 Mar 2013, Andreas Voellmy wrote:
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.