Packages within a package

John D. Ramsdell ramsdell at mitre.org
Tue Oct 23 16:03:13 EDT 2007


When I first carefully read the Cabal documentation, I remember
wondering why there is a limit of one on the number of libraries in a
package.  Reflecting on autoconf, and its AC_CONFIG_SUBDIRS macro, I
also wondered why packages cannot be components of a package.  If you
wrote a symbolic model checker, and you want it to be used with a
specific version of a binary decision diagram package, the simplest
way of enforcing this restriction is by including the package within
yours.  This is in fact how NuSMV is distributed.  (It includes CUDD.)

Recently, when I discovered there is no direct support for linking the
executables in a package with the library it defines, I wondered why
the advice was to separate the library and the executables into two
packages even though both are meant to be used and distributed as a
unit.

Does Cabal not support things like packages within a package simply
because Haskell libraries currently are not complex enough to require
such a feature, or is there a guiding design principle with which
these features are incompatible?

John


More information about the Libraries mailing list