on master help sign in
Remove some unnecessary bang patterns
60c75fbBryan O'Sullivan
Data/Text/Fusion.hs+2−2
@@ -100,7 +100,7 @@ copy src dest = (do
100 (_,max) <- getBounds src
100 (_,max) <- getBounds src
101 copy_loop 0 max)
101 copy_loop 0 max)
102 where
102 where
103− copy_loop !i !max
103+ copy_loop i max
104 | i > max = return ()
104 | i > max = return ()
105 | otherwise = do v <- unsafeRead src i
105 | otherwise = do v <- unsafeRead src i
106 unsafeWrite dest i v
106 unsafeWrite dest i v
@@ -475,7 +475,7 @@ length :: Stream Char -> Int
475length (Stream next s0 len) = loop_length 0# s0
475length (Stream next s0 len) = loop_length 0# s0
476 where
476 where
477
477
478− loop_length z# !s = case next s of
478+ loop_length z# s = case next s of
479 Done -> (I# z#)
479 Done -> (I# z#)
480 Skip s' -> loop_length z# s'
480 Skip s' -> loop_length z# s'
481 Yield _ s' -> loop_length (z# +# 1#) s'
481 Yield _ s' -> loop_length (z# +# 1#) s'