[commit: bytestring] ghc-7.6: Minor doc addition, spelling fixes (9f257e4)
Paolo Capriotti
p.capriotti at gmail.com
Thu Sep 6 12:29:16 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/bytestring
On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/9f257e47d2a9c838178fd8a8675ce646ec2bf0b4
>---------------------------------------------------------------
commit 9f257e47d2a9c838178fd8a8675ce646ec2bf0b4
Author: Duncan Coutts <duncan at community.haskell.org>
Date: Wed Sep 5 22:19:02 2012 +0000
Minor doc addition, spelling fixes
>---------------------------------------------------------------
Data/ByteString/Builder/ASCII.hs | 6 ++++++
Data/ByteString/Builder/Internal.hs | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Data/ByteString/Builder/ASCII.hs b/Data/ByteString/Builder/ASCII.hs
index 21d017a..d20015e 100644
--- a/Data/ByteString/Builder/ASCII.hs
+++ b/Data/ByteString/Builder/ASCII.hs
@@ -92,6 +92,12 @@ string7 = P.primMapListFixed P.char7
------------------
-- | Decimal encoding of an 'Int8' using the ASCII digits.
+--
+-- e.g.
+--
+-- > toLazyByteString (int8Dec 42) = "42"
+-- > toLazyByteString (int8Dec (-1)) = "-1"
+--
{-# INLINE int8Dec #-}
int8Dec :: Int8 -> Builder
int8Dec = P.primBounded P.int8Dec
diff --git a/Data/ByteString/Builder/Internal.hs b/Data/ByteString/Builder/Internal.hs
index 591a9e0..8308b29 100644
--- a/Data/ByteString/Builder/Internal.hs
+++ b/Data/ByteString/Builder/Internal.hs
@@ -27,7 +27,7 @@
-- We achieve (2) by requiring that every 'Builder' is implemented by a
-- 'BuildStep' that takes a continuation 'BuildStep', which it calls with the
-- updated 'BufferRange' after it is done. Therefore, only two pointers have
--- to be passed in a function call to implement concatentation of 'Builder's.
+-- to be passed in a function call to implement concatenation of 'Builder's.
-- Moreover, many 'Builder's are completely inlined, which enables the compiler
-- to sequence them without a function call and with no boxing at all.
--
@@ -38,7 +38,7 @@
-- comments of the 'builder' and 'put' functions for further information.
-- Note that there are /no safety belts/ at all, when implementing a 'Builder'
-- using an 'IO' action: you are writing code that might enable the next
--- buffer-overlow attack on a Haskell server!
+-- buffer-overflow attack on a Haskell server!
--
module Data.ByteString.Builder.Internal (
@@ -428,7 +428,7 @@ hPut h p = do
--
-- 1. GHC.IO.Handle.Internals mentions in "Note [async]" that
-- we should never do any side-effecting operations before
- -- an interuptible operation that may raise an async. exception
+ -- an interruptible operation that may raise an async. exception
-- as long as we are inside 'wantWritableHandle' and the like.
-- We possibly run the interuptible 'flushWriteBuffer' right at
-- the start of 'fillHandle', hence entering it a second time is
More information about the Cvs-libraries
mailing list