1 |
gienah 14/07/10 13:53:55 |
2 |
|
3 |
Added: bloomfilter-1.2.6.10-ghc-7.7.patch |
4 |
Log: |
5 |
Loosen quickcheck dep in bloomfilter-1.2.6.10-r2 |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 618E971F) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-haskell/bloomfilter/files/bloomfilter-1.2.6.10-ghc-7.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/bloomfilter/files/bloomfilter-1.2.6.10-ghc-7.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/bloomfilter/files/bloomfilter-1.2.6.10-ghc-7.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: bloomfilter-1.2.6.10-ghc-7.7.patch |
16 |
=================================================================== |
17 |
diff --git a/Data/BloomFilter.hs b/Data/BloomFilter.hs |
18 |
index 69711ef..97a8348 100644 |
19 |
--- a/Data/BloomFilter.hs |
20 |
+++ b/Data/BloomFilter.hs |
21 |
@@ -93,7 +93,8 @@ import Control.Monad (liftM, forM_) |
22 |
import Control.Monad.ST (ST, runST) |
23 |
import Control.DeepSeq (NFData(..)) |
24 |
import Data.Array.Base (unsafeAt, unsafeRead, unsafeWrite) |
25 |
-import Data.Array.ST (STUArray, thaw, unsafeFreeze) |
26 |
+import Data.Array.ST (STUArray, thaw) |
27 |
+import qualified Data.Array.Unsafe as U (unsafeFreeze) |
28 |
import Data.Array.Unboxed (UArray) |
29 |
import Data.Bits ((.&.), (.|.)) |
30 |
import Data.BloomFilter.Array (newArray) |
31 |
@@ -336,7 +337,7 @@ notElemB elt ub = any test (hashesU ub elt) |
32 |
-- occur. For a safer creation interface, use 'createB'. |
33 |
unsafeFreezeMB :: MBloom s a -> ST s (Bloom a) |
34 |
unsafeFreezeMB mb = B (hashMB mb) (shiftMB mb) (maskMB mb) `liftM` |
35 |
- unsafeFreeze (bitArrayMB mb) |
36 |
+ U.unsafeFreeze (bitArrayMB mb) |
37 |
|
38 |
-- | Copy an immutable Bloom filter to create a mutable one. There is |
39 |
-- no non-copying equivalent. |
40 |
diff --git a/Data/BloomFilter/Array.hs b/Data/BloomFilter/Array.hs |
41 |
index e085bbe..5accde9 100644 |
42 |
--- a/Data/BloomFilter/Array.hs |
43 |
+++ b/Data/BloomFilter/Array.hs |
44 |
@@ -3,7 +3,8 @@ |
45 |
|
46 |
module Data.BloomFilter.Array (newArray) where |
47 |
|
48 |
-import Control.Monad.ST (ST, unsafeIOToST) |
49 |
+import Control.Monad.ST (ST) |
50 |
+import qualified Control.Monad.ST.Unsafe as U (unsafeIOToST) |
51 |
import Data.Array.Base (MArray, STUArray(..), unsafeNewArray_) |
52 |
#if __GLASGOW_HASKELL__ >= 704 |
53 |
import Foreign.C.Types (CInt(..), CSize(..)) |
54 |
@@ -18,7 +19,7 @@ newArray :: forall e s. (MArray (STUArray s) e (ST s)) => |
55 |
{-# INLINE newArray #-} |
56 |
newArray numElems numBytes = do |
57 |
ary@(STUArray _ _ _ marr#) <- unsafeNewArray_ (0, numElems - 1) |
58 |
- _ <- unsafeIOToST (memset marr# 0 (fromIntegral numBytes)) |
59 |
+ _ <- U.unsafeIOToST (memset marr# 0 (fromIntegral numBytes)) |
60 |
return ary |
61 |
|
62 |
foreign import ccall unsafe "memset" |