Add -package-id, improve package shadowing behaviour and error messages
authorSimon Marlow <marlowsd@gmail.com>
Tue, 8 Sep 2009 14:09:06 +0000 (14:09 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 8 Sep 2009 14:09:06 +0000 (14:09 +0000)
commit03bb97e0a29fe3f414c17e6b4074f2c9e8e8012e
tree98ca624dc2735cc48c43fb45b0d085c412ecc464
parentb5f2a027f2b951fc0fba2c9bd62bb7d13898030c
Add -package-id, improve package shadowing behaviour and error messages
A few changes bundled together here:

 - Add -package-id flag, like -package but takes an
   InstalledPackageId as an argument (mainly for Cabal)
   (docs to follow)

 - Fix the shadowing behaviour: if we end up with
   two packages with the same name/version that came from
   different package databases, then one will shadow the
   other.  This may mean we have to disable other packages
   that depended on the now-shadowed package.  Lots of
   refactoring to ensure that we can get reasonable diagnostics when
   this happens

<command line>: cannot satisfy -package shadowdep:
    shadowdep-1-XXX is unusable due to missing or recursive dependencies:
      shadow-1-XXX
    (use -v for more information)
compiler/main/DynFlags.hs
compiler/main/Packages.lhs
ghc/InteractiveUI.hs