attoparsec 0.8.0.2 → 0.8.1.0
raw patch · 6 files changed
+19/−4 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Attoparsec: skip :: (Word8 -> Bool) -> Parser ()
+ Data.Attoparsec.Char8: isSpace :: Char -> Bool
Files
- Data/Attoparsec.hs +1/−0
- Data/Attoparsec/Char8.hs +1/−0
- Data/Attoparsec/FastSet.hs +1/−1
- Data/Attoparsec/Internal.hs +14/−0
- Data/Attoparsec/Lazy.hs +0/−1
- attoparsec.cabal +2/−2
Data/Attoparsec.hs view
@@ -46,6 +46,7 @@ , I.notWord8 , I.satisfy , I.satisfyWith+ , I.skip -- ** Byte classes , I.inClass
Data/Attoparsec/Char8.hs view
@@ -48,6 +48,7 @@ , isDigit_w8 , isAlpha_iso8859_15 , isAlpha_ascii+ , isSpace -- *** Character classes , inClass
Data/Attoparsec/FastSet.hs view
@@ -97,7 +97,7 @@ mkTable :: B.ByteString -> B.ByteString mkTable s = I.unsafeCreate 32 $ \t -> do- I.memset t 0 32+ _ <- I.memset t 0 32 U.unsafeUseAsCStringLen s $ \(p, l) -> let loop n | n == l = return () | otherwise = do
Data/Attoparsec/Internal.hs view
@@ -30,6 +30,7 @@ , satisfy , satisfyWith , anyWord8+ , skip , word8 , notWord8 @@ -244,6 +245,19 @@ if p w then put (B.unsafeTail s) >> return w else fail "satisfy"++-- | The parser @skip p@ succeeds for any byte for which the predicate+-- @p@ returns 'True'.+--+-- >digit = satisfy isDigit+-- > where isDigit w = w >= 48 && w <= 57+skip :: (Word8 -> Bool) -> Parser ()+skip p = do+ ensure 1+ s <- get+ if p (B.unsafeHead s)+ then put (B.unsafeTail s)+ else fail "skip" -- | The parser @satisfyWith f p@ transforms a byte, and succeeds if -- the predicate @p@ returns 'True' on the transformed value. The
Data/Attoparsec/Lazy.hs view
@@ -34,7 +34,6 @@ ) where import Data.ByteString.Lazy.Internal (ByteString(..), chunk)-import qualified Data.ByteString.Lazy as L import qualified Data.ByteString as B import qualified Data.Attoparsec as A import Data.Attoparsec hiding (Result(..), eitherResult, maybeResult,
attoparsec.cabal view
@@ -1,5 +1,5 @@ name: attoparsec-version: 0.8.0.2+version: 0.8.1.0 license: BSD3 license-file: LICENSE category: Text, Parsing@@ -40,7 +40,7 @@ build-depends: base < 2.0 || >= 3, bytestring >= 0.9, containers >= 0.1.0.1 if flag(applicative-in-base)- build-depends: base >= 2.0+ build-depends: base >= 2.0 && < 5.0 cpp-options: -DAPPLICATIVE_IN_BASE else build-depends: base < 2.0