From 4f7a612e15de9e35916fe2e7d395cedb378cafb6 Mon Sep 17 00:00:00 2001
From: Justin Bedo <cu@cua0.org>
Date: Mon, 28 Apr 2025 15:03:03 +1000
Subject: tweak hash function

---
 src/PPL/Internal.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/PPL/Internal.hs b/src/PPL/Internal.hs
index a81ba37..a5b3758 100644
--- a/src/PPL/Internal.hs
+++ b/src/PPL/Internal.hs
@@ -42,13 +42,13 @@ type HashMap k v = H.Dictionary (H.PrimState IO) UM.MVector k UM.MVector v
 data Hash = Hash {unhash :: Word64} deriving (Eq, Ord, Show)
 
 pushbit :: Bool -> Hash -> Hash
-pushbit b (Hash state) = Hash $ (0xB2DEEF07CB4ACD43 * fromBool b) `xor` (state `shiftL` 2) `xor` (state `shiftR` 2)
+pushbit b (Hash state) = Hash $ (16738720027710993212 * fromBool b) `xor` (state `shiftL` 3) `xor` (state `shiftR` 1)
   where
     fromBool True = 1
     fromBool False = 0
 
 initHash :: Hash
-initHash = Hash 0xE297DA430DB2DF1A
+initHash = Hash 6223102867371013753
 
 -- Reimplementation of the LazyPPL monads to avoid some dependencies
 
-- 
cgit v1.2.3