@@ -476,7 +476,6 @@ ensure n = T.Parser $ \t pos more lose succ ->
476476 Just n' -> succ t pos more (n', substring pos n' t)
477477 -- The uncommon case is kept out-of-line to reduce code size:
478478 Nothing -> ensureSuspended n t pos more lose succ
479−-- Non-recursive so the bounds check can be inlined:
480479{-# INLINE ensure #-}
481480
482481-- | Return both the result of a parse and the portion of the input
@@ -487,6 +486,7 @@ match p = T.Parser $ \t pos more lose succ ->
487486 (substring pos (pos'-pos) t', a)
488487 in runParser p t pos more lose succ'
489488
489+-- | Ensure that at least @n@ code points of input are available.
490490lengthAtLeast :: Pos -> Int -> Buffer -> Maybe Pos
491491lengthAtLeast pos n t = go 0 (fromPos pos)
492492 where go i !p