File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1163,7 +1163,7 @@ takeWhileEnd p t@(Text arr off len) = loop (len-1) len
11631163 where loop ! i ! l | l <= 0 = t
11641164 | p c = loop (i+ d) (l+ d)
11651165 | otherwise = text arr (off+ l) (len- l)
1166- where (c,d) = reverseIter t i
1166+ where Iter c d = reverseIter t i
11671167{-# INLINE [1] takeWhileEnd #-}
11681168
11691169-- | /O(n)/ 'dropWhile' @p@ @t@ returns the suffix remaining after
@@ -1189,7 +1189,7 @@ dropWhileEnd p t@(Text arr off len) = loop (len-1) len
11891189 where loop ! i ! l | l <= 0 = empty
11901190 | p c = loop (i+ d) (l+ d)
11911191 | otherwise = Text arr off l
1192- where (c,d) = reverseIter t i
1192+ where Iter c d = reverseIter t i
11931193{-# INLINE [1] dropWhileEnd #-}
11941194
11951195-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ iter_ (Text arr off _len) i | m < 0xD800 || m > 0xDBFF = 1
8989-- | /O(1)/ Iterate one step backwards through a UTF-16 array,
9090-- returning the current character and the delta to add (i.e. a
9191-- negative number) to give the next offset to iterate at.
92- reverseIter :: Text -> Int -> ( Char , Int )
92+ reverseIter :: Text -> Int -> Iter
9393reverseIter (Text arr off _len) i
94- | m < 0xDC00 || m > 0xDFFF = (unsafeChr m, - 1 )
95- | otherwise = (chr2 n m, - 2 )
94+ | m < 0xDC00 || m > 0xDFFF = Iter (unsafeChr m) ( - 1 )
95+ | otherwise = Iter (chr2 n m) ( - 2 )
9696 where m = A. unsafeIndex arr j
9797 n = A. unsafeIndex arr k
9898 j = off + i
You can’t perform that action at this time.
0 commit comments