OK, I will use build-depends. It works well. Thanks!


On Mon, Mar 25, 2013 at 1:54 PM, Henning Thielemann <lemming@henning-thielemann.de> wrote:

On Mon, 25 Mar 2013, Andreas Voellmy wrote:

OK, I just realized that the correct way of handling this is to use the "other-modules" field of the
executable section. In this instance, just adding "other-modules: A" in the executable section allows the
.hsc file to be found and compiled properly. 

As I said, this can be done and up to Cabal-1.14 this was the only possible way. Since Cabal-1.10 importing the library to the executable worked somehow, but Haddock failed. Today the proper way is to import the library by Build-Depends which saves disk space and compilation time, but requires the field Cabal-Version >= 1.8.