[Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

max ulidtko ulidtko at gmail.com
Tue May 24 06:38:07 CEST 2011


Hi haskell-cafe.

I have a package which builds with cabal pretty fine, but there is
namespace issue which disturbs me. The problem is that the package
exports (to the toplevel namespace!) some modules with fairly general
names, like Tests, Basics, Applications. This is probably an oversight
of the original package author, and the namespace shouldn't be organised
like this... but it is. And I'm looking for a way to avoid potential
namespace troubles should I install the package, other than going and
reforming the namespace tree myself.

What I was thinking about was some cabal option to "wrap" package's
namespace into a toplevel module, say "PackageName", so that module
Tests could be imported by usual code with `import PackageName.Tests`.
Is that possible with cabal?

Things are further complicated by the numerous intra-library imports.
While the "outside" code refers to a module with PackageName.ModuleName,
it would be very desirable that "inside" code used just straight
ModuleName.

------
Regards,
max ulidtko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110524/bf118409/attachment.pgp>


More information about the Haskell-Cafe mailing list