on master help sign in
Fix the calculation of size when streaming lazy text

--HG-- extra : convert_revision : ad5a261d9334e509f1af473a1f19f9a9a3386c70

commita79169d49c93426b2275c5a8ec39f3bf8ef15da6 authorBryan O'Sullivan <bos@serpentine.com> dateThu 14 Oct 2010, 19:47 (16 years ago) parentb659063
1 file changed+2−2
Data/Text/Lazy/Fusion.hs+2−2
Data/Text/Lazy/Fusion.hs+2−2
@@ -25,7 +25,7 @@ module Data.Text.Lazy.Fusion
2525import Prelude hiding (length)
2626import qualified Data.Text.Fusion.Common as S
2727import Data.Text.Fusion.Internal
28−import Data.Text.Fusion.Size (isEmpty)
28+import Data.Text.Fusion.Size (isEmpty, unknownSize)
2929import Data.Text.Lazy.Internal
3030import qualified Data.Text.Internal as I
3131import qualified Data.Text.Array as A
@@ -38,7 +38,7 @@ default(Int64)
3838
3939-- | /O(n)/ Convert a 'Text' into a 'Stream Char'.
4040stream :: Text -> Stream Char
41−stream text = Stream next (text :*: 0) 4 -- random HINT
41+stream text = Stream next (text :*: 0) unknownSize
4242 where
4343 next (Empty :*: _) = Done
4444 next (txt@(Chunk t@(I.Text _ _ len) ts) :*: i)