on master help sign in
Update some comments and whitespace
296d7b9Bryan O'Sullivan
Data/Text/Lazy/Builder.hs+5−2
@@ -3,7 +3,8 @@
3-----------------------------------------------------------------------------
3-----------------------------------------------------------------------------
4-- |
4-- |
5-- Module : Data.Text.Lazy.Builder
5-- Module : Data.Text.Lazy.Builder
6+-- Copyright : (c) 2013 Bryan O'Sullivan
6−-- Copyright : (c) 2010 Johan Tibell
7+-- (c) 2010 Johan Tibell
7-- License : BSD3-style (see LICENSE)
8-- License : BSD3-style (see LICENSE)
8--
9--
9-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
10-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
@@ -15,7 +16,9 @@
15-- @fromLazyText@, which construct new builders, and 'mappend', which
16-- @fromLazyText@, which construct new builders, and 'mappend', which
16-- concatenates two builders.
17-- concatenates two builders.
17--
18--
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
19--
22--
20-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
23-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
21--
24--
Data/Text/Lazy/Builder/Int.hs+5−4
@@ -1,7 +1,8 @@
1{-# LANGUAGE BangPatterns, CPP, MagicHash, RankNTypes, UnboxedTuples #-}
1{-# LANGUAGE BangPatterns, CPP, MagicHash, RankNTypes, UnboxedTuples #-}
2
2
3-- Module: Data.Text.Lazy.Builder.Int
3-- Module: Data.Text.Lazy.Builder.Int
4+-- Copyright: (c) 2013 Bryan O'Sullivan
4−-- Copyright: (c) 2011 MailRank, Inc.
5+-- (c) 2011 MailRank, Inc.
5-- License: BSD3
6-- License: BSD3
6-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
7-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
7-- Stability: experimental
8-- Stability: experimental
@@ -121,9 +122,9 @@ countDigits :: (Integral a) => a -> Int
121{-# INLINE countDigits #-}
122{-# INLINE countDigits #-}
122countDigits v0 = go 1 (fromIntegral v0 :: Word64)
123countDigits v0 = go 1 (fromIntegral v0 :: Word64)
123 where go !k v
124 where go !k v
124− | v < 10 = k
125+ | v < 10 = k
125− | v < 100 = k + 1
126+ | v < 100 = k + 1
126− | v < 1000 = k + 2
127+ | v < 1000 = k + 2
127 | v < 10000 = k + 3
128 | v < 10000 = k + 3
128 | otherwise = go (k+4) (v `quot` 10000)
129 | otherwise = go (k+4) (v `quot` 10000)
129
130
Data/Text/Lazy/Builder/Internal.hs+5−2
@@ -3,7 +3,8 @@
3-----------------------------------------------------------------------------
3-----------------------------------------------------------------------------
4-- |
4-- |
5-- Module : Data.Text.Lazy.Builder.Internal
5-- Module : Data.Text.Lazy.Builder.Internal
6+-- Copyright : (c) 2013 Bryan O'Sullivan
6−-- Copyright : (c) 2010 Johan Tibell
7+-- (c) 2010 Johan Tibell
7-- License : BSD3-style (see LICENSE)
8-- License : BSD3-style (see LICENSE)
8--
9--
9-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
10-- Maintainer : Johan Tibell <johan.tibell@gmail.com>
@@ -15,7 +16,9 @@
15-- @fromLazyText@, which construct new builders, and 'mappend', which
16-- @fromLazyText@, which construct new builders, and 'mappend', which
16-- concatenates two builders.
17-- concatenates two builders.
17--
18--
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
19--
22--
20-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
23-- > singleton 'a' `mappend` (singleton 'b' `mappend` singleton 'c')
21--
24--