diff --git a/Data/HashMap/Base.hs b/Data/HashMap/Base.hs index 007a71b1..395c5fd9 100644 --- a/Data/HashMap/Base.hs +++ b/Data/HashMap/Base.hs @@ -129,7 +129,7 @@ import Data.Semigroup (Semigroup((<>))) #endif import Control.DeepSeq (NFData(rnf)) import Control.Monad.ST (ST) -import Data.Bits ((.&.), (.|.), complement, popCount) +import Data.Bits ((.&.), (.|.), complement, popCount, unsafeShiftL, unsafeShiftR) import Data.Data hiding (Typeable) import qualified Data.Foldable as Foldable #if MIN_VERSION_base(4,10,0) @@ -144,7 +144,6 @@ import qualified Data.HashMap.Array as A import qualified Data.Hashable as H import Data.Hashable (Hashable) import Data.HashMap.Unsafe (runST) -import Data.HashMap.UnsafeShift (unsafeShiftL, unsafeShiftR) import Data.HashMap.List (isPermutationBy, unorderedCompare) import Data.Typeable (Typeable) @@ -2101,7 +2100,7 @@ bitsPerSubkey :: Int bitsPerSubkey = 4 maxChildren :: Int -maxChildren = fromIntegral $ 1 `unsafeShiftL` bitsPerSubkey +maxChildren = 1 `unsafeShiftL` bitsPerSubkey subkeyMask :: Bitmap subkeyMask = 1 `unsafeShiftL` bitsPerSubkey - 1 diff --git a/Data/HashMap/UnsafeShift.hs b/Data/HashMap/UnsafeShift.hs deleted file mode 100644 index 529ba504..00000000 --- a/Data/HashMap/UnsafeShift.hs +++ /dev/null @@ -1,16 +0,0 @@ -{-# LANGUAGE MagicHash #-} - -module Data.HashMap.UnsafeShift - ( unsafeShiftL - , unsafeShiftR - ) where - -import GHC.Exts (Word(W#), Int(I#), uncheckedShiftL#, uncheckedShiftRL#) - -unsafeShiftL :: Word -> Int -> Word -unsafeShiftL (W# x#) (I# i#) = W# (x# `uncheckedShiftL#` i#) -{-# INLINE unsafeShiftL #-} - -unsafeShiftR :: Word -> Int -> Word -unsafeShiftR (W# x#) (I# i#) = W# (x# `uncheckedShiftRL#` i#) -{-# INLINE unsafeShiftR #-} diff --git a/unordered-containers.cabal b/unordered-containers.cabal index c4646eb4..aec2a713 100644 --- a/unordered-containers.cabal +++ b/unordered-containers.cabal @@ -46,7 +46,6 @@ library Data.HashMap.Strict.Base Data.HashMap.List Data.HashMap.Unsafe - Data.HashMap.UnsafeShift Data.HashSet.Base build-depends: