Skip to content

Commit

Permalink
Require bytestring-0.11.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim authored and Lysxia committed Jul 10, 2023
1 parent fb243bb commit f86c18e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Data/Text/Internal/Encoding.hs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ validateUtf8Chunk bs = validateUtf8ChunkFrom 0 bs (,)
{-# INLINE validateUtf8ChunkFrom #-}
validateUtf8ChunkFrom :: forall r. Int -> ByteString -> (Int -> Maybe Utf8State -> r) -> r
validateUtf8ChunkFrom ofs bs k
#if defined(SIMDUTF) || MIN_VERSION_bytestring(0,11,2)
-- B.isValidUtf8 is buggy before bytestring-0.11.5.0
#if defined(SIMDUTF) || MIN_VERSION_bytestring(0,11,5)
| guessUtf8Boundary > 0 &&
-- the rest of the bytestring is valid utf-8 up to the boundary
(
Expand Down

0 comments on commit f86c18e

Please sign in to comment.