packages feed

attoparsec-enumerator 0.2.0.1 → 0.2.0.2

raw patch · 2 files changed

+3/−2 lines, 2 files

Files

Data/Attoparsec/Enumerator.hs view
@@ -34,7 +34,7 @@ -- If parsing fails, the iteratee's error value will contain a 'ParseError'. iterParser :: Monad m => A.Parser a -> E.Iteratee B.ByteString m a iterParser p = E.continue (step (A.parse p)) where-	step parse (E.Chunks xs) = parseLoop parse xs+	step parse (E.Chunks xs) = parseLoop parse (notEmpty xs) 	step parse E.EOF = case A.feed (parse B.empty) B.empty of 		A.Done extra a -> E.yield a $ if B.null extra 			then E.Chunks []@@ -51,3 +51,4 @@ 		A.Fail _ ctx msg -> err ctx msg 	 	err ctx msg = E.throwError (ParseError ctx msg)+	notEmpty = filter (not . B.null)
attoparsec-enumerator.cabal view
@@ -1,5 +1,5 @@ name: attoparsec-enumerator-version: 0.2.0.1+version: 0.2.0.2 synopsis: Convert an Attoparsec parser into an iteratee license: MIT license-file: license.txt