Skip to content

Commit 3488190

Browse files
committed
Tweak documentation
1 parent 271b3a6 commit 3488190

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Data/Text/Array.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,11 @@ unsafeIndex (ByteArray arr) i@(I# i#) =
134134
case indexWord8Array# arr i# of r# -> (W8# r#)
135135
{-# INLINE unsafeIndex #-}
136136

137-
-- | 'sizeofMutableByteArray#' is deprecated, because it is unsafe in the presence of
138-
-- 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
139-
--
140-
-- @since 2.0
137+
-- | @since 2.0
141138
getSizeofMArray :: MArray s -> ST s Int
142139
getSizeofMArray (MutableByteArray marr) = ST $ \s0# ->
140+
-- Cannot simply use (deprecated) 'sizeofMutableByteArray#', because it is
141+
-- unsafe in the presence of 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
143142
case getSizeofMutableByteArray# marr s0# of
144143
(# s1#, word8len# #) -> (# s1#, I# word8len# #)
145144

src/Data/Text/Internal/Encoding/Utf8.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ between x y z = x >= y && x <= z
6868
-- | ord c < 0x800 = 2
6969
-- | ord c < 0x10000 = 3
7070
-- | otherwise = 4
71+
-- Implementation suggested by Alex Mason.
7172

7273
-- | @since 2.0
7374
utf8Length :: Char -> Int

0 commit comments

Comments
 (0)