S. Alexander Jacobson
alex at alexjacobson.com
Wed May 18 13:41:21 EDT 2005
On Wed, 18 May 2005, Isaac Jones wrote:
> "S. Alexander Jacobson" <alex at alexjacobson.com> writes:
>> With Cabal, if you download two packages, how do you know that they
>> won't require conflicting versions of another module/package?
> That's specified by the dreaded build-depends field, of course.
So you like to use packages P1 and P2. You've decided to build a
program that uses both of them. How does build-depends tell you that
they both don't use the same hidden module name?
Or suppose that P1 build-depends on P3 and P2 depends on P4 and both
P3 and P4 expose the same module name.
With build-depends, you don't discover these sorts of conflicts
until you happen to use packages together.
Module maps give you a promise that a set of packages are compatible
with one another (don't overlap).
>> The implicit maps of Cabal's "build-depends" are an invitation for
> What's implicit about build-depends again?
The dependency graph that propagates from any package.
>> You have no particularly good reason to assume that any two
>> packages will be compatible.
> You don't have to assume anything. The packager tells you which
> packages are compatible.
The packager CAN'T tell you which packages are compatible. An
build-depends arbitrarily far away in the implicit dependency graph
can cause conflict.
>> SearchPath's explicit shared module maps makes it much less likely
>> that author and user will end up with different meanings for a
>> particular module name and make it much less likly that the user
>> won't be able to resolve module dependencies, making code reuse much
>> more likely.
> You're comparing apples to oranges. Hackage (not cabal) ensures that
> the end user can resolve module dependencies.
I don't think Hackage provides a mapping from module names to
packages. You talked about adding such a facility in this thread, but
even if you do, Hackage provides you with no simple way to tell that
the package you choose to implement the module will be compatible with
the other packages you are using.
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
More information about the Libraries