[project @ 2004-11-30 16:07:01 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / Packages.lhs
index d3a942b..a4b34a3 100644 (file)
@@ -58,8 +58,8 @@ import Compat.Directory       ( getAppUserDataDirectory )
 
 import Distribution.InstalledPackageInfo
 import Distribution.Package
+import Distribution.Version
 import System.IO       ( hPutStrLn, stderr )
-import Data.Version
 import Data.Maybe      ( fromJust, isNothing )
 import System.Directory        ( doesFileExist )
 import Control.Monad   ( when, foldM )
@@ -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.
@@ -382,7 +384,7 @@ overlappingError pkg overlaps
 multiplePackagesErr str ps =
   throwDyn (CmdLineError (showSDoc (
                   text "Error; multiple packages match" <+> 
-                       text str <> colon <>
+                       text str <> colon <+>
                    sep (punctuate comma (map (text.showPackageId.package) ps))
                )))