[commit: packages/bytestring] ghc-head: Fix typos in docs of 'unsafePackAddressLen' (36e7e21)
git at git.haskell.org
git at git.haskell.org
Thu Aug 29 10:19:10 CEST 2013
Repository : ssh://git@git.haskell.org/bytestring
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/bytestring.git;a=commit;h=36e7e21329583a29db49f83bf1ae3e965e27130b
>---------------------------------------------------------------
commit 36e7e21329583a29db49f83bf1ae3e965e27130b
Author: Simon Meier <simon.meier at erudify.ch>
Date: Mon Mar 11 08:22:01 2013 +0100
Fix typos in docs of 'unsafePackAddressLen'
>---------------------------------------------------------------
36e7e21329583a29db49f83bf1ae3e965e27130b
Data/ByteString/Unsafe.hs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Data/ByteString/Unsafe.hs b/Data/ByteString/Unsafe.hs
index 373f78f..cf1bb27 100644
--- a/Data/ByteString/Unsafe.hs
+++ b/Data/ByteString/Unsafe.hs
@@ -151,8 +151,8 @@ unsafeDrop n (PS x s l) = assert (0 <= n && n <= l) $ PS x (s+n) (l-n)
#if defined(__GLASGOW_HASKELL__)
-- | /O(1)/ 'unsafePackAddressLen' provides constant-time construction of
--- 'ByteStrings' which is ideal for string literals. It packs a sequence
--- of bytes into a 'ByteString', given a raw 'Addr#' to the string, and
+-- 'ByteString's, which is ideal for string literals. It packs a sequence
+-- of bytes into a @ByteString@, given a raw 'Addr#' to the string, and
-- the length of the string.
--
-- This function is /unsafe/ in two ways:
@@ -165,7 +165,7 @@ unsafeDrop n (PS x s l) = assert (0 <= n && n <= l) $ PS x (s+n) (l-n)
-- reflected in resulting @ByteString@, breaking referential
-- transparency.
--
--- If in doubt, don't use these functions.
+-- If in doubt, don't use this function.
--
unsafePackAddressLen :: Int -> Addr# -> IO ByteString
unsafePackAddressLen len addr# = do
More information about the ghc-commits
mailing list