From 725968162ab3a8c00c3f7f14ff377e5ded7cd090 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 30 Nov 2004 15:31:56 +0000 Subject: [PATCH] [project @ 2004-11-30 15:31:56 by simonmar] Allow -ignore-package P when P doesn't exist (thanks to George Russell for the report). --- ghc/compiler/main/Packages.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/main/Packages.lhs b/ghc/compiler/main/Packages.lhs index 8a317c0..5e0cfa1 100644 --- a/ghc/compiler/main/Packages.lhs +++ b/ghc/compiler/main/Packages.lhs @@ -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. -- 1.7.10.4