Safe Haskell | Safe-Inferred |
---|
- stmSink :: MonadIO m => (a -> STM (Maybe r)) -> Sink a m (Maybe r)
- stmSink' :: MonadIO m => (a -> STM ()) -> Sink a m ()
- tchanSink :: MonadIO m => TChan a -> Sink a m ()
- stmSource :: MonadIO m => STM (Maybe a) -> FeedSource m a
- stmSource' :: MonadIO m => STM a -> FeedSource m a
- tchanSource :: MonadIO m => TChan a -> FeedSource m a
Sinks
stmSink :: MonadIO m => (a -> STM (Maybe r)) -> Sink a m (Maybe r)Source
A sink that executes (atomically) a STM action for every input received. The sink continues as long as the action returns Nothing. When the action returns Just, then that value is the result of the sink.
stmSink' :: MonadIO m => (a -> STM ()) -> Sink a m ()Source
A sink that executes (atomically) a STM action for every input received. The sink never terminates.
Sources
stmSource :: MonadIO m => STM (Maybe a) -> FeedSource m aSource
Source that executes a STM action to get a new item. When the action returns Nothing
then the source is depleted.
stmSource' :: MonadIO m => STM a -> FeedSource m aSource
Source that executes a STM action to get a new item. Does never run out of items.
tchanSource :: MonadIO m => TChan a -> FeedSource m aSource
Source that reads from a TChan. Does never run out of items (just waits for new ones written to the TChan).