[project @ 2004-11-30 15:31:56 by simonmar]
authorsimonmar <unknown>
Tue, 30 Nov 2004 15:31:56 +0000 (15:31 +0000)
committersimonmar <unknown>
Tue, 30 Nov 2004 15:31:56 +0000 (15:31 +0000)
Allow -ignore-package P when P doesn't exist (thanks to George Russell
for the report).

ghc/compiler/main/Packages.lhs

index 8a317c0..5e0cfa1 100644 (file)
@@ -267,8 +267,10 @@ mkPackageState dflags pkg_db = do
                (ps,_)   -> multiplePackagesErr str ps
        procflags pkgs expl (IgnorePackage str : flags) = do
           case partition (matches str) pkgs of
-               ([],_)  -> missingPackageErr str
                (ps,qs) -> procflags qs expl flags
+               -- missing package is not an error for -ignore-package,
+               -- because a common usage is to -ignore-package P as
+               -- a preventative measure just in case P exists.
 
        -- A package named on the command line can either include the
        -- version, or just the name if it is unambiguous.