Safe Haskell | Safe-Inferred |
---|

- data Stream m a
- = Terminated
- | Value (m (a, Stream m a))

- sideEffect :: Monad m => (a -> m ()) -> Stream m a -> Stream m a
- listToStream :: Monad m => [a] -> Stream m a
- repeatS :: Monad m => a -> Stream m a
- repeatSM :: Monad m => m a -> Stream m a
- iterateS :: Monad m => (a -> m a) -> a -> Stream m a
- foldS :: Monad m => (a -> t -> a) -> a -> Stream m t -> m a
- foldSM :: Monad m => (a -> t -> m a) -> a -> Stream m t -> m a
- time :: (t, t1) -> t
- value :: (t, t1) -> t1
- mergeTimeStreams :: (Monad m, Ord t2) => t -> t1 -> Stream m (t2, t) -> Stream m (t2, t1) -> Stream m (t2, (t, t1))
- mergeTimeStreamsWith :: (Monad m, Ord t2) => t -> t1 -> (t -> t1 -> t3) -> Stream m (t2, t) -> Stream m (t2, t1) -> Stream m (t2, t3)
- mergeManyW :: (Monad m, Ord t) => [t1] -> (t1 -> t1 -> t1) -> [Stream m (t, t1)] -> Stream m (t, t1)
- mergeS :: (Monad m, Ord a) => Stream m (a, t) -> Stream m (a, t1) -> Stream m (LRB (a, t) (a, (t, t1)) (a, t1))
- data LRB a b c
- mergeE :: Monad m => (t, t1) -> Stream m (LRB (t2, t) (t2, (t, t1)) (t2, t1)) -> Stream m (t2, (t, t1))
- push :: Monad m => a -> Stream m a -> Stream m a
- zipS :: Applicative f => f a1 -> f a -> f (a1, a)
- sequenceS :: Monad m => Stream m (m a) -> Stream m a
- mapMS :: Monad m => (a -> m b) -> Stream m a -> Stream m b
- dropS :: Monad m => Int -> Stream m a -> Stream m a
- takeS :: Monad m => Int -> Stream m a -> Stream m a
- takeWhileS :: Monad m => (a -> Bool) -> Stream m a -> Stream m a
- consS :: Monad m => a -> Stream m a -> Stream m a
- pairS :: Monad m => Stream m a -> Stream m (a, a)
- terminateOn :: Monad m => (a -> Bool) -> Stream m a -> Stream m a
- runStream :: Monad m => Stream m a -> m [a]
- runStream_ :: Monad m => Stream m t -> m ()
- runLast :: Monad m => a -> Stream m a -> m a
- runLast1 :: Monad m => Stream m a -> m a

# Documentation

Stream of monadic values

Terminated | |

Value (m (a, Stream m a)) |

sideEffect :: Monad m => (a -> m ()) -> Stream m a -> Stream m aSource

Attaching side effects

listToStream :: Monad m => [a] -> Stream m aSource

Repeating stream

iterateS :: Monad m => (a -> m a) -> a -> Stream m aSource

Create a stream by iterating a monadic action

foldS :: Monad m => (a -> t -> a) -> a -> Stream m t -> m aSource

Pure and monadic left fold over a stream

mergeTimeStreams :: (Monad m, Ord t2) => t -> t1 -> Stream m (t2, t) -> Stream m (t2, t1) -> Stream m (t2, (t, t1))Source

mergeTimeStreamsWith :: (Monad m, Ord t2) => t -> t1 -> (t -> t1 -> t3) -> Stream m (t2, t) -> Stream m (t2, t1) -> Stream m (t2, t3)Source

mergeManyW :: (Monad m, Ord t) => [t1] -> (t1 -> t1 -> t1) -> [Stream m (t, t1)] -> Stream m (t, t1)Source

mergeS :: (Monad m, Ord a) => Stream m (a, t) -> Stream m (a, t1) -> Stream m (LRB (a, t) (a, (t, t1)) (a, t1))Source

mergeE :: Monad m => (t, t1) -> Stream m (LRB (t2, t) (t2, (t, t1)) (t2, t1)) -> Stream m (t2, (t, t1))Source

zipS :: Applicative f => f a1 -> f a -> f (a1, a)Source

dropS :: Monad m => Int -> Stream m a -> Stream m aSource

Drop elements from the stream. Due to stream structure, this operation cannot fail gracefully when dropping more elements than what is found in the stream

runStream_ :: Monad m => Stream m t -> m ()Source