@@ -725,7 +725,7 @@ unfoldrNI n f s0 | n < 0 = empty
725-------------------------------------------------------------------------------
725-------------------------------------------------------------------------------
726-- * Substreams
726-- * Substreams
728−-- | /O(n)/ take n, applied to a stream, returns the prefix of the
728+-- | /O(n)/ @'take' n@, applied to a stream, returns the prefix of the
729-- stream of length @n@, or the stream itself if @n@ is greater than the
729-- stream of length @n@, or the stream itself if @n@ is greater than the
730-- length of the stream.
730-- length of the stream.
731take :: Integral a => a -> Stream Char -> Stream Char
731take :: Integral a => a -> Stream Char -> Stream Char
@@ -743,7 +743,7 @@ take n0 (Stream next0 s0 len) =
743data Drop a s = NS !s
743data Drop a s = NS !s
744 | JS !a !s
744 | JS !a !s
746−-- | /O(n)/ drop n, applied to a stream, returns the suffix of the
746+-- | /O(n)/ @'drop' n@, applied to a stream, returns the suffix of the
747-- stream after the first @n@ characters, or the empty stream if @n@
747-- stream after the first @n@ characters, or the empty stream if @n@
748-- is greater than the length of the stream.
748-- is greater than the length of the stream.
749drop :: Integral a => a -> Stream Char -> Stream Char
749drop :: Integral a => a -> Stream Char -> Stream Char
@@ -763,8 +763,8 @@ drop n0 (Stream next0 s0 len) =
763 Yield x s' -> Yield x (NS s')
763 Yield x s' -> Yield x (NS s')
764{-# INLINE [0] drop #-}
764{-# INLINE [0] drop #-}
766−-- | takeWhile, applied to a predicate @p@ and a stream, returns the
766+-- | 'takeWhile', applied to a predicate @p@ and a stream, returns the
767−-- longest prefix (possibly empty) of elements that satisfy p.
767+-- longest prefix (possibly empty) of elements that satisfy @p@.
768takeWhile :: (Char -> Bool) -> Stream Char -> Stream Char
768takeWhile :: (Char -> Bool) -> Stream Char -> Stream Char
769takeWhile p (Stream next0 s0 len) = Stream next s0 len -- HINT maybe too high
769takeWhile p (Stream next0 s0 len) = Stream next s0 len -- HINT maybe too high
@@ -776,7 +776,7 @@ takeWhile p (Stream next0 s0 len) = Stream next s0 len -- HINT maybe too high
776 | otherwise -> Done
776 | otherwise -> Done
777{-# INLINE [0] takeWhile #-}
777{-# INLINE [0] takeWhile #-}
779−-- | dropWhile @p @xs returns the suffix remaining after takeWhile @p @xs.
779+-- | @'dropWhile' p xs@ returns the suffix remaining after @'takeWhile' p xs@.
780dropWhile :: (Char -> Bool) -> Stream Char -> Stream Char
780dropWhile :: (Char -> Bool) -> Stream Char -> Stream Char
781dropWhile p (Stream next0 s0 len) = Stream next (L s0) len -- HINT maybe too high
781dropWhile p (Stream next0 s0 len) = Stream next (L s0) len -- HINT maybe too high
@@ -812,7 +812,7 @@ isPrefixOf (Stream next1 s1 _) (Stream next2 s2 _) = loop (next1 s1) (next2 s2)
812-------------------------------------------------------------------------------
812-------------------------------------------------------------------------------
813-- ** Searching by equality
813-- ** Searching by equality
815−-- | /O(n)/ elem is the stream membership predicate.
815+-- | /O(n)/ 'elem' is the stream membership predicate.
816elem :: Char -> Stream Char -> Bool
816elem :: Char -> Stream Char -> Bool
817elem w (Stream next s0 _len) = loop_elem s0
817elem w (Stream next s0 _len) = loop_elem s0