@@ -104,7 +104,7 @@ singleton c = Stream next False 1 -- HINT maybe too low
104104{-# INLINE singleton #-}
105105
106106streamList :: [a] -> Stream a
107−{-# INLINE streamList #-}
107+{-# INLINE [0] streamList #-}
108108streamList [] = empty
109109streamList s = Stream next s unknownLength
110110 where next [] = Done
@@ -112,13 +112,15 @@ streamList s = Stream next s unknownLength
112112 unknownLength = 8 -- random HINT
113113
114114unstreamList :: Stream a -> [a]
115−{-# INLINE unstreamList #-}
115+{-# INLINE [0] unstreamList #-}
116116unstreamList (Stream next s0 _len) = unfold s0
117117 where unfold !s = case next s of
118118 Done -> []
119119 Skip s' -> unfold s'
120120 Yield x s' -> x : unfold s'
121121
122+{-# RULES "STREAM streamList/unstreamList fusion" forall s. streamList (unstreamList s) = s #-}
123+
122124-- ----------------------------------------------------------------------------
123125-- * Basic stream functions
124126