Correct the type of feed
commite94e8f6ec5f0db1cf7c619de0823ec73282030d7
authorBryan O'Sullivan <bos@serpentine.com>
dateFri 23 May 2014, 16:33 (12 years ago)
parent474ce14
Data/Attoparsec/ByteString/Char8.hs+2−1
@@ -27,9 +27,10 @@ module Data.Attoparsec.ByteString.Char8
2727
2828 -- * Running parsers
2929 , A.parse
30+ , A.feed
3031 , A.parseOnly
31− , A.parseTest
3232 , A.parseWith
33+ , A.parseTest
3334
3435 -- ** Result conversion
3536 , A.maybeResult
Data/Attoparsec/Combinator.hs+1−1
@@ -231,7 +231,7 @@ eitherP a b = (Left <$> a) <|> (Right <$> b)
231231
232232-- | If a parser has returned a 'T.Partial' result, supply it with more
233233-- input.
234−feed :: Monoid t => IResult t t r -> t -> IResult t t r
234+feed :: Monoid i => IResult i t r -> i -> IResult i t r
235235feed f@(Fail _ _ _) _ = f
236236feed (Partial k) d = k d
237237feed (Done t r) d = Done (mappend t d) r