forked from mirrors/nixpkgs
Patch attoparsec-binary to work with GHC 7.6.1
This commit is contained in:
parent
47706bf9f6
commit
882ccb0f52
|
@ -0,0 +1,20 @@
|
|||
diff --git a/Data/Attoparsec/Binary.hs b/Data/Attoparsec/Binary.hs
|
||||
index fab76c6..01d6c8b 100644
|
||||
--- a/Data/Attoparsec/Binary.hs
|
||||
+++ b/Data/Attoparsec/Binary.hs
|
||||
@@ -23,7 +23,7 @@ import Data.Word
|
||||
byteSize :: (Bits a) => a -> Int
|
||||
byteSize = (`div` 8) . bitSize
|
||||
|
||||
-pack :: (Bits a) => B.ByteString -> a
|
||||
+pack :: (Bits a, Num a) => B.ByteString -> a
|
||||
pack = B.foldl' (\n h -> (n `shiftL` 8) .|. fromIntegral h) 0
|
||||
|
||||
anyWordN :: (Bits a) => (B.ByteString -> a) -> Parser a
|
||||
@@ -84,4 +84,4 @@ word64be = wordN unpack
|
||||
|
||||
-- |Match a specific 64-bit little-endian word.
|
||||
word64le :: Word64 -> Parser Word64
|
||||
-word64le = wordN $ B.reverse . unpack
|
||||
\ No newline at end of file
|
||||
+word64le = wordN $ B.reverse . unpack
|
|
@ -5,6 +5,7 @@ cabal.mkDerivation (self: {
|
|||
version = "0.1.0.1";
|
||||
sha256 = "1d3zjr8bh6d44v1vid0cvrrbyhn7xj4bn96vy36dzk7h7p87bzxa";
|
||||
buildDepends = [ attoparsec ];
|
||||
patches = [ ./attoparsec-binary-ghc7.6.1.patch ];
|
||||
meta = {
|
||||
description = "Binary processing extensions to Attoparsec";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
|
|
Loading…
Reference in a new issue