on master help sign in
Update some comments and whitespace
commit296d7b972da30f3a2efe594470ffc7d1fcd67807 authorBryan O'Sullivan <bos@serpentine.com> dateTue 19 Mar 2013, 10:08 (14 years ago) parent663a117
3 files changed+15−8
Data/Text/Lazy/Builder.hs+5−2 Data/Text/Lazy/Builder/Int.hs+5−4 Data/Text/Lazy/Builder/Internal.hs+5−2
Data/Text/Lazy/Builder.hs+5−2
@@ -3,7 +3,8 @@
33-----------------------------------------------------------------------------
44-- |
55-- Module : Data.Text.Lazy.Builder
6−-- Copyright : (c) 2010 Johan Tibell
6+-- Copyright : (c) 2013 Bryan O'Sullivan
7+-- (c) 2010 Johan Tibell
78-- License : BSD3-style (see LICENSE)
89--
910-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
@@ -15,7 +16,9 @@
1516-- @fromLazyText@, which construct new builders, and 'mappend', which
1617-- concatenates two builders.
1718--
18−-- To get maximum performance when building lazy @Text@ values using a builder, associate @mappend@ calls to the right. For example, prefer
19+-- To get maximum performance when building lazy @Text@ values using a
20+-- builder, associate @mappend@ calls to the right. For example,
21+-- prefer
1922--
2023-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
2124--
Data/Text/Lazy/Builder/Int.hs+5−4
@@ -1,7 +1,8 @@
11{-# LANGUAGE BangPatterns, CPP, MagicHash, RankNTypes, UnboxedTuples #-}
22
33-- Module: Data.Text.Lazy.Builder.Int
4−-- Copyright: (c) 2011 MailRank, Inc.
4+-- Copyright: (c) 2013 Bryan O'Sullivan
5+-- (c) 2011 MailRank, Inc.
56-- License: BSD3
67-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
78-- Stability: experimental
@@ -121,9 +122,9 @@ countDigits :: (Integral a) => a -> Int
121122{-# INLINE countDigits #-}
122123countDigits v0 = go 1 (fromIntegral v0 :: Word64)
123124 where go !k v
124− | v < 10 = k
125− | v < 100 = k + 1
126− | v < 1000 = k + 2
125+ | v < 10 = k
126+ | v < 100 = k + 1
127+ | v < 1000 = k + 2
127128 | v < 10000 = k + 3
128129 | otherwise = go (k+4) (v `quot` 10000)
129130
Data/Text/Lazy/Builder/Internal.hs+5−2
@@ -3,7 +3,8 @@
33-----------------------------------------------------------------------------
44-- |
55-- Module : Data.Text.Lazy.Builder.Internal
6−-- Copyright : (c) 2010 Johan Tibell
6+-- Copyright : (c) 2013 Bryan O'Sullivan
7+-- (c) 2010 Johan Tibell
78-- License : BSD3-style (see LICENSE)
89--
910-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
@@ -15,7 +16,9 @@
1516-- @fromLazyText@, which construct new builders, and 'mappend', which
1617-- concatenates two builders.
1718--
18−-- To get maximum performance when building lazy @Text@ values using a builder, associate @mappend@ calls to the right. For example, prefer
19+-- To get maximum performance when building lazy @Text@ values using a
20+-- builder, associate @mappend@ calls to the right. For example,
21+-- prefer
1922--
2023-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
2124--