Christiaan suggested that I try cabal installing "--disable-library-vanilla" which I combined with --enable-shared. It almost works. It causes ghc to only create the dynamic libraries. However, ghc-pkg register fails with the error:
/usr/local/bin/ghc-pkg update - --global --user --package-db=dist/package.conf.inplace
cabal: TestLib-0.1.0.0: cannot find libHSTestLib-0.1.0.0.a on library path
(use --force to override)
Failed to install TestLib-0.1.0.0
It seems that ghc-pkg thinks that we must have the .a files to register the package. (I scanned the ghc-pkg source and it looks like checkHSLib is where this check happens.)
So, is the check in ghc-pkg really correct? I.e. the package would be unusable without the .a file? Or would this be OK, so we really should change ghc-pkg?
-Andi