on master help sign in
Make streaming cons strict in its first argument
commite280bab7e09efad9d1729b6d83d576bd28c0c75f authorBryan O'Sullivan <bos@serpentine.com> dateWed 24 Oct 2012, 13:55 (14 years ago) parent02bc09b
1 file changed+1−1
Data/Text/Fusion/Common.hs+1−1
Data/Text/Fusion/Common.hs+1−1
@@ -172,7 +172,7 @@ data C s = C0 !s
172172
173173-- | /O(n)/ Adds a character to the front of a Stream Char.
174174cons :: Char -> Stream Char -> Stream Char
175−cons w (Stream next0 s0 len) = Stream next (C1 s0) (len+1)
175+cons !w (Stream next0 s0 len) = Stream next (C1 s0) (len+1)
176176 where
177177 next (C1 s) = Yield w (C0 s)
178178 next (C0 s) = case next0 s of