@@ -67,18 +67,19 @@ empty = Stream next () 0
67{-# INLINE [0] empty #-}
67{-# INLINE [0] empty #-}
69-- | /O(n)/ Determines if two streams are equal.
69-- | /O(n)/ Determines if two streams are equal.
70−eq :: Ord a => Stream a -> Stream a -> Bool
70+eq :: (Eq a) => Stream a -> Stream a -> Bool
72eq (Stream next1 s1 _) (Stream next2 s2 _) = cmp (next1 s1) (next2 s2)
71eq (Stream next1 s1 _) (Stream next2 s2 _) = cmp (next1 s1) (next2 s2)
74− cmp Done Done = True
73+ cmp Done Done = True
77 cmp (Skip s1') (Skip s2') = cmp (next1 s1') (next2 s2')
74 cmp (Skip s1') (Skip s2') = cmp (next1 s1') (next2 s2')
78 cmp (Skip s1') x2 = cmp (next1 s1') x2
75 cmp (Skip s1') x2 = cmp (next1 s1') x2
79 cmp x1 (Skip s2') = cmp x1 (next2 s2')
76 cmp x1 (Skip s2') = cmp x1 (next2 s2')
80 cmp (Yield x1 s1') (Yield x2 s2') = x1 == x2 &&
79 cmp (Yield x1 s1') (Yield x2 s2') = x1 == x2 &&
81 cmp (next1 s1') (next2 s2')
80 cmp (next1 s1') (next2 s2')
82+{-# SPECIALISE eq :: Stream Char -> Stream Char -> Bool #-}
83streamList :: [a] -> Stream a
84streamList :: [a] -> Stream a
84{-# INLINE streamList #-}
85{-# INLINE streamList #-}