attoparsec-binary 0.1 → 0.1.0.1
raw patch · 2 files changed
+19/−18 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/Attoparsec/Binary.hs +17/−15
- attoparsec-binary.cabal +2/−3
Data/Attoparsec/Binary.hs view
@@ -1,18 +1,19 @@ -- |Binary processing extensions to Attoparsec.-module Data.Attoparsec.Binary(- anyWord16be,- anyWord16le,- anyWord32be,- anyWord32le,- anyWord64be,- anyWord64le,- word16be,- word16le,- word32be,- word32le,- word64be,- word64le- ) where+module Data.Attoparsec.Binary+ (+ anyWord16be+ , anyWord16le+ , anyWord32be+ , anyWord32le+ , anyWord64be+ , anyWord64le+ , word16be+ , word16le+ , word32be+ , word32le+ , word64be+ , word64le+ ) where import Data.Attoparsec import Data.Bits@@ -55,7 +56,8 @@ anyWord64le = anyWordN $ pack . B.reverse unpack :: (Bits a, Integral a) => a -> B.ByteString-unpack x = B.pack $ map (fromIntegral . shiftR x . (8 *)) $ reverse [0..byteSize x - 1]+unpack x = B.pack $ map f $ reverse [0..byteSize x - 1]+ where f s = fromIntegral $ shiftR x (8 * s) wordN :: (Bits a) => (a -> B.ByteString) -> a -> Parser a wordN u w = string (u w) >> return w
attoparsec-binary.cabal view
@@ -1,9 +1,8 @@ Name: attoparsec-binary-Version: 0.1+Version: 0.1.0.1 Author: Andrew Drake Copyright: (c) 2011 Andrew Drake Maintainer: adrake@adrake.org-Version: 0.1 Synopsis: Binary processing extensions to Attoparsec. Stability: unstable @@ -22,7 +21,7 @@ Source-Repository head Type: git- Location: git://github.com/drakedevel/attoparsec-binary.git+ Location: http://git.hax.so/pub/scm/attoparsec-binary.git Library Exposed-modules: Data.Attoparsec.Binary