Duncan Coutts wrote:
On Thu, 2009-09-17 at 05:49 -0700, Simon Marlow wrote:
Thu Sep 17 05:15:10 PDT 2009  Simon Marlow <[email protected]>
  * Allow -package-id to override the default package shadowing semantics
  Ignore-this: 30d211e9989085f1de40552569b544b9
  So that Cabal, if it wants, can use a more general algorithm to find a
  consistent set of packages to use.

Thanks Simon.

As I said on #ghc yesterday, I think the significant thing is that it
means the semantics of package merging is simply Data.Map.union. Then
selecting a consistent subset is has to be done with the constraints of
the compiler in mind, but at least the basic merging is not
compiler-dependent.

The problem for GHC is that in general, since each "-package foo" or "-hide-package foo" can be satisfied by multiple packages, it's a constraint-solving problem to find the consistent solutions. So we don't try to do that, instead we restrict the set of packages to a consistent set first, and only let you pick from those.

It was straightforward to generalise the story for -package-id, since -package-id names a single package. The transitive closure of packages chosen by -package-id take precedence when we're deciding which packages to keep to make a consistent set.

So is Cabal (the library) going to be doing this constraint-solving stuff, or just cabal-install? How will Cabal choose which packages to use?

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to