Fix hashInt
authorIan Lynagh <igloo@earth.li>
Tue, 21 Aug 2007 14:07:06 +0000 (14:07 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 21 Aug 2007 14:07:06 +0000 (14:07 +0000)
commit0c685143cbdfcfc3964cf945f8df1b2f3cb0cef8
tree226ba22344429a06b896e2eecb391d50f5fab773
parentfb1bea8371fd34f8fb9858a315773a8b0492f295
Fix hashInt
As pointed out in
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2007-August/009545.html
the old behaviour was
Prelude Data.HashTable> map hashInt [0..10]
[0,-1,-1,-2,-2,-2,-3,-3,-4,-4,-4]

Fixed according to the "Fibonacci Hashing" algorithm described in
http://www.brpreiss.com/books/opus4/html/page213.html
http://www.brpreiss.com/books/opus4/html/page214.html
Data/HashTable.hs