| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Pipes.Misc.Concurrent
Documentation
fromInputSTM :: Input a -> Producer' a STM () Source #
Like Pipes.Concurrent.fromInput, but stays in STM.
Using hoist atomically to convert to IO monad seems to work.
Do not use unsafeHoist atomically.
Each transaction is atomically scoped around each yield,
so be careful when filter or similar pipes to remove yields
as this results in larger transactions and it may cause BlockIndefinitelyOnSTM exceptions.
Intead, use Monoids to yield mempty so that the STM state changes.
toOutputSTM :: Output a -> Consumer' a STM () Source #
Like Pipes.Concurrent.toOutput, but stays in STM.
Using hoist atomically to convert to IO monad seems to work.
Do not use unsafeHoist atomically.
toOutputMaybeT :: Output a -> a -> MaybeT STM () Source #
Convert PC.Output a -> STM Bool to a -> MaybeT STM ()