@@ -208,6 +208,7 @@ toList :: (Streaming t, Monad m) => t m a -> m [a]
208208toList = foldrM (\a xs -> fmap (a :) xs) (return [])
209209
210210-- | Take first 'n' elements from the stream and discard the rest.
211+{-# INLINE take #-}
211212take :: Streaming t => Int -> t m a -> t m a
212213take n m = fromStream $ go n (toStream m)
213214 where
@@ -229,6 +230,7 @@ filter p m = fromStream $ go (toStream m)
229230 in (runStream m1) ctx stp yield
230231
231232-- | End the stream as soon as the predicate fails on an element.
233+{-# INLINE takeWhile #-}
232234takeWhile :: Streaming t => (a -> Bool) -> t m a -> t m a
233235takeWhile p m = fromStream $ go (toStream m)
234236 where