[Haskell-cafe] cabal test-suite library recompilation

Antoine Latter aslatter at gmail.com
Tue Mar 13 17:22:09 CET 2012

On Tue, Mar 13, 2012 at 11:16 AM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:
> While waiting for a build to finish [ :) ], I just wanted to write an email
> and check if this is intentional or only an oversight. Or maybe a technical
> limitation for the time being?

If your library code and test code are in separate sub-directories and
you reference your library as a package dependency for your test then
Cabal won't re-build your library.

That is, the 'Hs-source-disr' for the library and the test should not
overlap. Otherwise GHC will compile the file-on-disk instead of
grabbing the module from a package.


More information about the Haskell-Cafe mailing list