1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From 2d1f0027ae1ca56bbf4449887cf3bc61dc1c8e84 Mon Sep 17 00:00:00 2001
From: foo <foo@bar>
Date: Sat, 21 Sep 2013 22:32:01 +0000
Subject: [PATCH] fix build with new ghc
---
Data/HashMap/Base.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Data/HashMap/Base.hs b/Data/HashMap/Base.hs
index 6a77df4..93a384d 100644
--- a/Data/HashMap/Base.hs
+++ b/Data/HashMap/Base.hs
@@ -86,7 +86,7 @@ import qualified Data.List as L
import Data.Monoid (Monoid(mempty, mappend))
import Data.Traversable (Traversable(..))
import Data.Word (Word)
-import GHC.Exts ((==#), build, reallyUnsafePtrEquality#)
+import GHC.Exts ((==#), build, reallyUnsafePtrEquality#, tagToEnum#)
import Prelude hiding (filter, foldr, lookup, map, null, pred)
import qualified Data.HashMap.Array as A
@@ -1072,5 +1072,5 @@ fullNodeMask = complement (complement 0 `unsafeShiftL` maxChildren)
-- | Check if two the two arguments are the same value. N.B. This
-- function might give false negatives (due to GC moving objects.)
ptrEq :: a -> a -> Bool
-ptrEq x y = reallyUnsafePtrEquality# x y ==# 1#
+ptrEq x y = tagToEnum# (reallyUnsafePtrEquality# x y ==# 1#)
{-# INLINE ptrEq #-}
--
1.7.10.4
|