@@ -154,7 +154,7 @@ newtype DecoderState = DecoderState Word32 deriving (Eq, Num, Storable)
154decodeUtf8With' :: OnDecodeError -> ByteString -> Decoder
154decodeUtf8With' :: OnDecodeError -> ByteString -> Decoder
155decodeUtf8With' onErr = decodeChunk 0 0
155decodeUtf8With' onErr = decodeChunk 0 0
157− -- We create a slightly larger than necessary buffer to accomodate a
157+ -- We create a slightly larger than necessary buffer to accommodate a
158 -- potential surrogate pair started in the last buffer
158 -- potential surrogate pair started in the last buffer
159 decodeChunk :: CodePoint -> DecoderState -> ByteString -> Decoder
159 decodeChunk :: CodePoint -> DecoderState -> ByteString -> Decoder
160 decodeChunk codepoint0 state0 (PS fp off len) =
160 decodeChunk codepoint0 state0 (PS fp off len) =
@@ -209,7 +209,7 @@ decodeUtf8 = decodeUtf8With strictDecode
209{-# RULES "STREAM stream/decodeUtf8 fusion" [1]
209{-# RULES "STREAM stream/decodeUtf8 fusion" [1]
210 forall bs. F.stream (decodeUtf8 bs) = E.streamUtf8 strictDecode bs #-}
210 forall bs. F.stream (decodeUtf8 bs) = E.streamUtf8 strictDecode bs #-}
212−-- | Decode a 'ByteString' containing UTF-8 encoded text..
212+-- | Decode a 'ByteString' containing UTF-8 encoded text.
214-- If the input contains any invalid UTF-8 data, the relevant
214-- If the input contains any invalid UTF-8 data, the relevant
215-- exception will be returned, otherwise the decoded text.
215-- exception will be returned, otherwise the decoded text.