packages feed

binary-strict 0.4.8 → 0.4.8.1

raw patch · 2 files changed

+4/−3 lines, 2 filesdep ~basedep ~mtlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, mtl

API changes (from Hackage documentation)

- Data.Binary.Strict.Class: class (Monad m, Alternative m) => BinaryParser m
+ Data.Binary.Strict.Class: class (Monad m, Alternative m) => BinaryParser m where spanOf1 p = do { result <- spanOf p; if null result then fail "" else return result } string s = do { s' <- getByteString $ length s; if s == s' then return () else fail $ "expecting:" ++ show s } word8 w = do { w' <- getWord8; if w == w' then return () else fail "" } oneOf p = do { w <- getWord8; if p w then return w else fail "" } many p = do { v <- (p >>= return . Just) <|> (return Nothing); case v of { Just x -> do { rest <- many p; return $ x : rest } Nothing -> return [] } } many1 p = do { result <- many p; case result of { [] -> fail "" x -> return x } } optional p = (p >>= return . Just) <|> return Nothing

Files

binary-strict.cabal view
@@ -1,5 +1,5 @@ name:            binary-strict-version:         0.4.8+version:         0.4.8.1 license:         BSD3 license-file:    LICENSE author:          Lennart Kolmodin <kolmodin@dtek.chalmers.se>@@ -14,7 +14,7 @@ 		 documentation. synopsis:        Binary deserialisation using strict ByteStrings category:        Data, Parsing-build-depends:   base<5, containers, array, bytestring>=0.9, mtl+build-depends:   base<5, containers, array, bytestring>=0.9 stability:       provisional tested-with:     GHC == 6.8.2 exposed-modules: Data.Binary.BitPut@@ -31,3 +31,4 @@ extra-source-files: tests/BitGetTest.hs, src/Data/Binary/Strict/Common.h ghc-options:     -Wall -fno-warn-name-shadowing build-type:      Simple+build-depends:   mtl >= 2.1 && <2.2
src/Data/Binary/BitBuilder.hs view
@@ -37,9 +37,9 @@  import Foreign import Data.Monoid-import Data.Word import qualified Data.ByteString      as S import qualified Data.ByteString.Lazy as L+import System.IO.Unsafe (unsafePerformIO)  #ifdef BYTESTRING_IN_BASE import Data.ByteString.Base (inlinePerformIO)