@@ -869,7 +869,7 @@ wrappedBufferRangeCopyStep (BufferRange ip0 ipe) k =
869869
870870
871871-- | Construct a 'Builder' that copies the 'S.StrictByteString's, if it is
872- -- smaller than the treshold , and inserts it directly otherwise.
872+ -- smaller than the threshold , and inserts it directly otherwise.
873873--
874874-- For example, @byteStringThreshold 1024@ copies 'S.StrictByteString's whose size
875875-- is less or equal to 1kb, and inserts them directly otherwise. This implies
@@ -1017,7 +1017,7 @@ modUtf8_step !ip !len k (BufferRange op ope)
10171017 ! usable = avail `min` len
10181018 -- null-termination makes it possible to read one more byte than the
10191019 -- nominal input length, with any unexpected 0xC000 ending interpreted
1020- -- as a NUL. More typically, this simplifies hanlding of inputs where
1020+ -- as a NUL. More typically, this simplifies handling of inputs where
10211021 -- 0xC0 0x80 might otherwise be split across the "usable" input window.
10221022 ! ch <- peekElemOff ip (usable - 1 )
10231023 let ! use | ch /= 0xC0 = usable
@@ -1308,15 +1308,15 @@ buildStepToCIOS (AllocationStrategy nextBuffer bufSize trim) =
13081308 else do buf' <- nextBuffer (Just (buf, bufSize))
13091309 fill nextStep buf'
13101310
1311- -- Wrap and yield a chunk, trimming it if necesary
1311+ -- Wrap and yield a chunk, trimming it if necessary
13121312 {-# INLINE wrapChunk #-}
13131313 wrapChunk :: Ptr Word8 -> (Bool -> IO (ChunkIOStream a )) -> IO (ChunkIOStream a )
13141314 wrapChunk ! op' mkCIOS
13151315 | chunkSize == 0 = mkCIOS True
13161316 | trim chunkSize size = do
13171317 bs <- S. createFp chunkSize $ \ fpbuf' ->
13181318 S. memcpyFp fpbuf' fpbuf chunkSize
1319- -- It is not safe to re-use the old buffer (see #690),
1319+ -- It is not safe to reuse the old buffer (see #690),
13201320 -- so we allocate a new buffer after trimming.
13211321 return $ Yield1 bs (mkCIOS False )
13221322 | otherwise =
0 commit comments