[commit: ghc] master: Remove unused hashName declaration (2ee2527)

git at git.haskell.org git at git.haskell.org
Tue Oct 7 13:52:56 UTC 2014


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

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

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

commit 2ee252783b732649f6075b769bd6b964e3823400
Author: Jack Henahan <jhenahan at me.com>
Date:   Tue Oct 7 08:48:18 2014 -0500

    Remove unused hashName declaration
    
    Summary:
    With the exception of the todo added in 2012, this function has been
    untouched since 2007. It is not used anywhere else in GHC, so it appears
    to be safe to remove. The accompanying comment refers to hashExpr, which
    I couldn't find anywhere in the sources, either.
    
    Test Plan: Removed declaration and export. Compiler built succesfully. No test cases exist to fail, and no other module appears to use it.
    
    Reviewers: thomie, austin
    
    Reviewed By: thomie, austin
    
    Subscribers: simonmar, ezyang, carter, thomie
    
    Differential Revision: https://phabricator.haskell.org/D261


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

2ee252783b732649f6075b769bd6b964e3823400
 compiler/basicTypes/Name.lhs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/compiler/basicTypes/Name.lhs b/compiler/basicTypes/Name.lhs
index 0647c60..c4f10fb 100644
--- a/compiler/basicTypes/Name.lhs
+++ b/compiler/basicTypes/Name.lhs
@@ -49,7 +49,7 @@ module Name (
         nameUnique, setNameUnique,
         nameOccName, nameModule, nameModule_maybe,
         tidyNameOcc,
-        hashName, localiseName,
+        localiseName,
         mkLocalisedOccName,
 
         nameSrcLoc, nameSrcSpan, pprNameDefnLoc, pprDefinedAt,
@@ -349,11 +349,6 @@ mkLocalisedOccName this_mod mk_occ name = mk_occ origin (nameOccName name)
 %************************************************************************
 
 \begin{code}
-hashName :: Name -> Int         -- ToDo: should really be Word
-hashName name = getKey (nameUnique name) + 1
-        -- The +1 avoids keys with lots of zeros in the ls bits, which
-        -- interacts badly with the cheap and cheerful multiplication in
-        -- hashExpr
 
 cmpName :: Name -> Name -> Ordering
 cmpName n1 n2 = iBox (n_uniq n1) `compare` iBox (n_uniq n2)



More information about the ghc-commits mailing list