Cabal vs Haskell [sic]

S. Alexander Jacobson alex at
Tue Apr 26 00:50:16 EDT 2005

On Tue, 26 Apr 2005, Shae Matijs Erisson wrote:

> "S. Alexander Jacobson" <alex at> writes:
>> 4. A set of modules may be dependent on a set of packages if and only if that
>> set of packages is the only set of packages that may contain them.
> I don't understand. What does this mean?
> Modules must be contained by a package to depend on that package?

Package P contains module A.  Module A only imports module B.  So 
module A is dependent on itself and access to module B.

Package P does not contain a module B, but its build depends tag does 
identify a set of pacages on which it depends Ps

Access to module B is dependent on access to Ps if and only if no 
other package provides access to module B.

The spec says that build-depends identifies the packages "needed to 
build this one."

If packages other than Ps may provide access to module B then the
build-depends tag cannot identify the dependencies of module A because 
Ps are not necessary, only sufficient.

Build-depends identifies necessity not sufficiency.

>> 5. Since more than one set of packages may contain the same set of modules,
>> the current Haskell story cannot be consistent with the current Cabal story.
> Why can't multiple packages have the same set of modules?


This all started because I had claimed that the Haskell story is that 
module names identify modules and that the Cabal story is that package 
names qualify module names to identify modules.  If module names fully 
identify modules then multiple packages may expose the same set of 
modules.  However, if package names qualify module names then, by 
definition, a module in a different package is a differnt module. I 
favored the Haskell story, in part, because I believe that multiple 
packages should be allowed to have the same set of modules.

Isaac and Simon Marlow, however denied my interpretation of Cabal.

However, this proof shows that Cabal's build-depends doesn't make 
sense unless only one package may expose a given module and that would 
be true if and only if package names qualify module names.

And, if Cabal requires that package names qualify module names, it is 
inconsistent with the Haskell story that they don't!


S. Alexander Jacobson tel:917-770-6565

More information about the Libraries mailing list