[GHC] #4108: GHC.Integer.hashInteger is a misnomer and confuses
people
GHC
cvs-ghc at haskell.org
Sun May 30 21:45:39 EDT 2010
#4108: GHC.Integer.hashInteger is a misnomer and confuses people
---------------------------+------------------------------------------------
Reporter: duncan | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.2
Resolution: invalid | Keywords:
Difficulty: | Os: Unknown/Multiple
Testcase: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Comment(by duncan):
The new `berp` package uses it (but will stop using it in the next
release). The author did not realise that `GHC.Integer.hashInteger` is
basically the identity function and would not have used it if they had
known.
By comparison, `Data.HashTable.hashInt` is not an identity. I defer to
Eric that perhaps the existing `hashInteger` could be usable as a hash
function in some circumstances. It does however seem a bit special-purpose
to use that name, and it could be named something less misleading.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4108#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list