1. Bryan O'Sullivan
  2. attoparsec

Commits

Bryan O'Sullivan  committed c7149ae

Use mkState instead of raw constructor.

  • Participants
  • Parent commits 063b5bc
  • Branches default

Comments (0)

Files changed (1)

File src/Data/ParserCombinators/Attoparsec/Internal.hs

View file
 satisfy p =
     Parser $ \s@(S sb lb n) ->
            case SB.uncons sb of
-             Just (c, sb') | p c -> Right (c, S sb' lb (n + 1))
+             Just (c, sb') | p c -> Right (c, mkState (sb' +: lb) (n + 1))
                            | otherwise -> Left (sb +: lb, [])
              Nothing -> unParser (nextChunk >> satisfy p) s
 {-# INLINE satisfy #-}