[commit: ghc] master: ghc-pkg --enable-multi-instance should not complain about case sensitivity. (cd2dc9e)

git at git.haskell.org git at git.haskell.org
Sat Aug 29 11:26:00 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cd2dc9e2cf80881e96b98d025c2848edeca11ba4/ghc

>---------------------------------------------------------------

commit cd2dc9e2cf80881e96b98d025c2848edeca11ba4
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Sat Aug 29 12:25:28 2015 +0200

    ghc-pkg --enable-multi-instance should not complain about case sensitivity.
    
    Test Plan: validate
    
    Reviewers: simonmar, bgamari, austin
    
    Reviewed By: bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1177


>---------------------------------------------------------------

cd2dc9e2cf80881e96b98d025c2848edeca11ba4
 utils/ghc-pkg/Main.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 1d80e97..fbd7dae 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1665,7 +1665,8 @@ checkDuplicates db_stack pkg multi_instance update = do
         uncasep = map toLower . display
         dups = filter ((== uncasep pkgid) . uncasep) (map sourcePackageId pkgs)
 
-  when (not update && not (null dups)) $ verror ForceAll $
+  when (not update && not multi_instance
+                   && not (null dups)) $ verror ForceAll $
         "Package names may be treated case-insensitively in the future.\n"++
         "Package " ++ display pkgid ++
         " overlaps with: " ++ unwords (map display dups)



More information about the ghc-commits mailing list