Commit 3488190f authored by Bodigrim's avatar Bodigrim
Browse files

Tweak documentation

parent 271b3a66
......@@ -134,12 +134,11 @@ unsafeIndex (ByteArray arr) i@(I# i#) =
case indexWord8Array# arr i# of r# -> (W8# r#)
{-# INLINE unsafeIndex #-}
-- | 'sizeofMutableByteArray#' is deprecated, because it is unsafe in the presence of
-- 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
--
-- @since 2.0
-- | @since 2.0
getSizeofMArray :: MArray s -> ST s Int
getSizeofMArray (MutableByteArray marr) = ST $ \s0# ->
-- Cannot simply use (deprecated) 'sizeofMutableByteArray#', because it is
-- unsafe in the presence of 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
case getSizeofMutableByteArray# marr s0# of
(# s1#, word8len# #) -> (# s1#, I# word8len# #)
......
......@@ -68,6 +68,7 @@ between x y z = x >= y && x <= z
-- | ord c < 0x800 = 2
-- | ord c < 0x10000 = 3
-- | otherwise = 4
-- Implementation suggested by Alex Mason.
-- | @since 2.0
utf8Length :: Char -> Int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment