git.iko.soy/typeable/attoparsec
on master help sign in
Use mkState instead of raw constructor.
commit8c92b810669ff9f54f3c10aedc1e01f087adb8d0 authorBryan O'Sullivan <bos@serpentine.com> dateTue 30 Dec 2008, 23:08 (18 years ago) parent039f9eb
1 file changed+1−1
src/Data/ParserCombinators/Attoparsec/Internal.hs+1−1
src/Data/ParserCombinators/Attoparsec/Internal.hs+1−1
@@ -187,7 +187,7 @@ satisfy :: (Word8 -> Bool) -> Parser Word8
187187satisfy p =
188188 Parser $ \s@(S sb lb n) ->
189189 case SB.uncons sb of
190− Just (c, sb') | p c -> Right (c, S sb' lb (n + 1))
190+ Just (c, sb') | p c -> Right (c, mkState (sb' +: lb) (n + 1))
191191 | otherwise -> Left (sb +: lb, [])
192192 Nothing -> unParser (nextChunk >> satisfy p) s
193193{-# INLINE satisfy #-}