projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
16508b3
)
LPS chunk sizes should be 16 bytes, not 17.
author
Don Stewart
<dons@cse.unsw.edu.au>
Fri, 10 Nov 2006 02:12:54 +0000
(
02:12
+0000)
committer
Don Stewart
<dons@cse.unsw.edu.au>
Fri, 10 Nov 2006 02:12:54 +0000
(
02:12
+0000)
Data/ByteString/Lazy.hs
patch
|
blob
|
history
diff --git
a/Data/ByteString/Lazy.hs
b/Data/ByteString/Lazy.hs
index
6c45784
..
c9d3bdb
100644
(file)
--- a/
Data/ByteString/Lazy.hs
+++ b/
Data/ByteString/Lazy.hs
@@
-410,8
+410,8
@@
length (LPS ss) = L.foldl' (\n ps -> n + fromIntegral (P.length ps)) 0 ss
-- You can however use 'repeat' and 'cycle' to build infinite lazy ByteStrings.
--
cons :: Word8 -> ByteString -> ByteString
-cons c (LPS (s:ss)) | P.length s <= 16 = LPS (P.cons c s : ss)
-cons c (LPS ss) = LPS (P.singleton c : ss)
+cons c (LPS (s:ss)) | P.length s < 16 = LPS (P.cons c s : ss)
+cons c (LPS ss) = LPS (P.singleton c : ss)
{-# INLINE cons #-}
-- | /O(n\/c)/ Append a byte to the end of a 'ByteString'