satisfy' :: (Char -> Bool) -> Parser' Char
satisfy' p = do
  st <- liftP' S.get
  case B.uncons st of
    Nothing ->
      E.throwError EndOfInput

    Just (c, st')
      | p c ->
          liftP' (S.put st') >> return c
      | otherwise ->
          E.throwError $ Chatty ("invalid character: " ++ show (B.head st))
satisfy' :: (Char -> Bool) -> Parser' Char
satisfy' p = do
  st <- liftP' S.get
  case B.uncons st of
    Nothing ->
      E.throwError EndOfInput

    Just (c, st')
      | p c ->
          liftP' (S.put st') >> return c
      | otherwise ->
          E.throwError $ Chatty ("invalid character: " ++ show (B.head st))
satisfy' p = do
  st <- liftP' S.get
  case B.uncons st of
    Nothing ->
      E.throwError EndOfInput

    Just (c, st')
      | p c ->
          liftP' (S.put st') >> return c
      | otherwise ->
          E.throwError $ Chatty ("invalid character: " ++ show (B.head st))