[Haskell] Re: Trying to install binary-0.4
duncan.coutts at worc.ox.ac.uk
Tue Oct 16 20:28:45 EDT 2007
On Wed, 2007-10-17 at 00:35 +0100, Ian Lynagh wrote:
> [would it be possible to pick a single list to discuss this on please,
> so there is no danger of some people missing some subthreads if they
> aren't on all the lists, or getting messages 3 times if they are?]
> On Tue, Oct 16, 2007 at 01:08:49PM +0100, Simon Marlow wrote:
> > 2. Precise dependencies.
> While not directly related to this, I have the impression some people
> want precise dependencies so that things work properly when multiple
> versions of a library are installed.
> Personally I'm not a fan of that, as if I have
> package foo:
> module Foo where
> data T
> package bar:
> module Bar where
> bar :: T
> package baz:
> module Baz where
> baz :: T -> ()
> baz bar
> might be a type error if I have multiple versions of foo installed and
> bar and baz have been compiled against different versions.
Sure, those are not compatible. But we can detect that just by looking
at the dependencies of each package. The solution is to distinguish
private and public dependencies and to slot packages on their own
version numbers and all version numbers of the packages they publicly
depend upon. Then in your example we'd just compile another copy of bar
or baz using a compatible version of foo. This is what Nix does.
More information about the Libraries