1 |
slyfox 11/08/01 20:24:32 |
2 |
|
3 |
Added: binary-0.5.0.2-ghc-7.patch |
4 |
Log: |
5 |
Added build fix for ghc-7. |
6 |
|
7 |
(Portage version: 2.1.10.7/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: binary-0.5.0.2-ghc-7.patch |
16 |
=================================================================== |
17 |
Patch was taken from binary fork of ghc-7 branch |
18 |
Fri Jul 30 15:29:36 EEST 2010 simonpj@×××××××××.com |
19 |
* Add type signature on local binding |
20 |
diff -rN -u old-binary/src/Data/Binary/Get.hs new-binary/src/Data/Binary/Get.hs |
21 |
--- old-binary/src/Data/Binary/Get.hs 2010-10-31 18:08:10.633817506 +0200 |
22 |
+++ new-binary/src/Data/Binary/Get.hs 2010-10-31 18:08:10.641817506 +0200 |
23 |
@@ -370,16 +370,17 @@ |
24 |
return (xs, ys)) |
25 |
|
26 |
where |
27 |
- first r 0 xs@(L.Chunk _ _) = writeSTRef r xs >> return L.Empty |
28 |
- first r _ L.Empty = writeSTRef r L.Empty >> return L.Empty |
29 |
- |
30 |
- first r n (L.Chunk x xs) |
31 |
- | n < l = do writeSTRef r (L.Chunk (B.drop (fromIntegral n) x) xs) |
32 |
- return $ L.Chunk (B.take (fromIntegral n) x) L.Empty |
33 |
- | otherwise = do writeSTRef r (L.drop (n - l) xs) |
34 |
- liftM (L.Chunk x) $ unsafeInterleaveST (first r (n - l) xs) |
35 |
- |
36 |
- where l = fromIntegral (B.length x) |
37 |
+ first :: STRef s L.ByteString -> Int64 -> L.ByteString -> ST s L.ByteString |
38 |
+ first r 0 xs@(L.Chunk _ _) = writeSTRef r xs >> return L.Empty |
39 |
+ first r _ L.Empty = writeSTRef r L.Empty >> return L.Empty |
40 |
+ |
41 |
+ first r n (L.Chunk x xs) |
42 |
+ | n < l = do writeSTRef r (L.Chunk (B.drop (fromIntegral n) x) xs) |
43 |
+ return $ L.Chunk (B.take (fromIntegral n) x) L.Empty |
44 |
+ | otherwise = do writeSTRef r (L.drop (n - l) xs) |
45 |
+ liftM (L.Chunk x) $ unsafeInterleaveST (first r (n - l) xs) |
46 |
+ where |
47 |
+ l = fromIntegral (B.length x) |
48 |
#else |
49 |
splitAtST i (B.LPS ps) = runST ( |
50 |
do r <- newSTRef undefined |