From fb326dba5141f8636cb0c0eb0639b8d0c0caa931 Mon Sep 17 00:00:00 2001
From: Austin Seipp <austin@well-typed.com>
Date: Thu, 19 Mar 2015 14:21:02 -0500
Subject: [PATCH] compiler: don't warn on -package-name for now

This avoids the annoying conundrum explained in #9956 - for the 7.10
release, we'll keep (silently) supporting this flag so -Werror doesn't
trip anything up.

Really, we could just say 'deal with it' to users probably, but the fix
is painless and does remove a sharp corner.

Signed-off-by: Austin Seipp <austin@well-typed.com>

Reviewers: ezyang

Differential Revision: https://phabricator.haskell.org/D742

GHC Trac Issues: #9956
---
 compiler/main/DynFlags.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 4c93657f9584..93c386c74f74 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2732,9 +2732,7 @@ package_flags = [
       (NoArg $ do removeUserPkgConf
                   deprecate "Use -no-user-package-db instead")
 
-  , defGhcFlag "package-name"      (HasArg $ \name -> do
-                                      upd (setPackageKey name)
-                                      deprecate "Use -this-package-key instead")
+  , defGhcFlag "package-name"       (hasArg setPackageKey)
   , defGhcFlag "this-package-key"   (hasArg setPackageKey)
   , defFlag "package-id"            (HasArg exposePackageId)
   , defFlag "package"               (HasArg exposePackage)
-- 
GitLab