Monday, October 05, 2009

Cabal oddity

When you use Cabal to make a library, you have to be careful about what you include in the 'exposed-modules' section.  If you don't include a module, and you refer to it in another library, the code will compile, but not link.  It will give you an uninformative (ar) error message about undefined symbols.
This will even happen if you export modules that use unexported modules.  I think of this as a bug,
but for now, I suggest exporting every module that might be touched by an export.

No comments:

Post a Comment