From 987b36a4cabf3ee9bea7c871f32c366ba5a73b9a Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Fri, 20 Jan 2012 14:26:49 +0000 Subject: [PATCH] Reverse the result of parsing a leftover bytestring I don't know if this is the most efficient way to do it, or if there's a way to accumulate the list in the correct order in the first place --- attoparsec-conduit/Data/Conduit/Attoparsec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attoparsec-conduit/Data/Conduit/Attoparsec.hs b/attoparsec-conduit/Data/Conduit/Attoparsec.hs index dbb1ccfd8..96ad43af5 100644 --- a/attoparsec-conduit/Data/Conduit/Attoparsec.hs +++ b/attoparsec-conduit/Data/Conduit/Attoparsec.hs @@ -108,7 +108,7 @@ conduitParser p0 = C.conduitState push parser c = {-# SCC "push" #-} do case doParse parser c [] of Left pErr -> lift $ C.resourceThrow pErr - Right (cont, results) -> return (cont, C.Producing results) + Right (cont, results) -> return (cont, C.Producing $ reverse results) -- doParse :: (A.Parser a b) -> a -> [b] -- -> Either ParseError ((a -> A.IResult a b), [b])