Skip to content

Commit f15c3c2

Browse files
committed
Use bit instead of shiftL
1 parent 2355edc commit f15c3c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Properties/HashMapLazy.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module MODULE_NAME (tests) where
1818
import Control.Applicative (Const (..))
1919
import Control.Monad (guard)
2020
import Data.Bifoldable
21-
import Data.Bits (shiftL, (.&.))
21+
import Data.Bits (bit, (.&.))
2222
import Data.Function (on)
2323
import Data.Functor.Identity (Identity (..))
2424
import Data.Hashable (Hashable (hashWithSalt))
@@ -84,7 +84,7 @@ moreCollisions :: Int -> Int
8484
moreCollisions w = fromIntegral (w .&. mask)
8585

8686
mask :: Int
87-
mask = sum [1 `shiftL` n | n <- [0, 3, 8, 14, 61]]
87+
mask = sum [bit n | n <- [0, 3, 8, 14, 61]]
8888

8989
instance (Eq k, Hashable k, Arbitrary k, Arbitrary v) => Arbitrary (HashMap k v) where
9090
arbitrary = fmap (HM.fromList) arbitrary

0 commit comments

Comments
 (0)