summaryrefslogtreecommitdiff
path: root/compiler/utils/FastString.hs
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-07-21 14:59:55 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-08-24 19:07:00 +0200
commit37a0b50b5e28a326159bb464effb499c1d9de775 (patch)
treed329bc0a2d54c1342e433fe6aa40ccb3419aa814 /compiler/utils/FastString.hs
parenta5061a96724922097e4181d452a64618e35fa297 (diff)
downloadhaskell-37a0b50b5e28a326159bb464effb499c1d9de775.tar.gz
Delete ExtsCompat46 (#8330)
We require ghc-7.8 to build HEAD (ghc-7.11). Differential Revision: https://phabricator.haskell.org/D1165
Diffstat (limited to 'compiler/utils/FastString.hs')
-rw-r--r--compiler/utils/FastString.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 32482ccb0b..e1ef46abe1 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -104,7 +104,7 @@ import qualified Data.ByteString.Char8 as BSC
import qualified Data.ByteString.Internal as BS
import qualified Data.ByteString.Unsafe as BS
import Foreign.C
-import ExtsCompat46
+import GHC.Exts
import System.IO
import System.IO.Unsafe ( unsafePerformIO )
import Data.Data
@@ -454,10 +454,10 @@ hashStr :: Ptr Word8 -> Int -> Int
-- use the Addr to produce a hash value between 0 & m (inclusive)
hashStr (Ptr a#) (I# len#) = loop 0# 0#
where
- loop h n | n ExtsCompat46.==# len# = I# h
- | otherwise = loop h2 (n ExtsCompat46.+# 1#)
+ loop h n | isTrue# (n ==# len#) = I# h
+ | otherwise = loop h2 (n +# 1#)
where !c = ord# (indexCharOffAddr# a# n)
- !h2 = (c ExtsCompat46.+# (h ExtsCompat46.*# 128#)) `remInt#`
+ !h2 = (c +# (h *# 128#)) `remInt#`
hASH_TBL_SIZE#
-- -----------------------------------------------------------------------------