@@ -85,13 +85,9 @@ import qualified Data.ByteString.Unsafe as B
8585
8686#if defined(__GLASGOW_HASKELL__)
8787import GHC.Base (realWorld#)
88−import GHC.Exts (inline)
8988import GHC.IO (IO(IO))
9089#else
9190import System.IO.Unsafe (unsafePerformIO)
92−
93−inline :: a -> a
94−inline x = x
9591#endif
9692
9793type Parser = T.Parser B.ByteString
@@ -116,9 +112,7 @@ ensure' !n0 i0 a0 m0 kf0 ks0 =
116112ensure :: Int -> Parser B.ByteString
117113ensure !n = T.Parser $ \i0 a0 m0 kf ks ->
118114 if B.length (unI i0) >= n
119− -- Inline the success continuation to avoid creating a closure in
120− -- the common case of enough data in the buffer:
121− then inline ks i0 a0 m0 (unI i0)
115+ then ks i0 a0 m0 (unI i0)
122116 -- The uncommon case is kept out-of-line to reduce code size:
123117 else ensure' n i0 a0 m0 kf ks
124118-- Non-recursive so the bounds check can be inlined: