Cabal recompiles library for executables
simonmar at microsoft.com
Mon Dec 4 10:21:09 EST 2006
Henning Thielemann wrote:
> If a project consists of both a library and executables, the library
> modules are re-compiled for each executable. (I use GHC.) That leads to
> high space and time consumption. Is this a bug or a feature?
A package that has both a library and executables isn't supported well right
now, and in fact the intention is to deprecate and remove it. Actually I'm
surprised if it works at all.
The right way is to have a separate package to contain the library code, and
depend on this package for your executables.
More information about the cabal-devel