Safe Haskell | None |
---|---|
Language | Haskell98 |
A BroadcasterSimpleBroadcaster is a variable SourceSimpleSource paired with its update function
Synopsis
- data GeneralBroadcaster x d
- data Broadcaster x d
- data SimpleBroadcaster x
- newBroadcaster :: x -> IO (Broadcaster x d)
- newSimpleBroadcaster :: x -> IO (SimpleBroadcaster x)
- newGeneralBroadcaster :: x -> IO (GeneralBroadcaster x d)
- class BroadcasterClass broadcaster value | broadcaster -> value where
- applySimpleUpdate :: SimpleBroadcaster x -> (x -> x) -> IO ()
- applySimpleUpdate' :: SimpleBroadcaster x -> (x -> (x, y)) -> IO y
- applyUpdate :: Broadcaster x d -> (x -> (x, [d])) -> IO ()
- applyGeneralUpdate :: GeneralBroadcaster x d -> (x -> (x, [d], extra)) -> IO extra
- switchOffSimpleSource :: SimpleSource a -> IO (SimpleSource a, IO (IO ()))
- mirrorSimpleSource :: SimpleSource a -> IO (SimpleSource a, IO ())
- mirrorSimpleSourceWithDelayer :: Delayer -> SimpleSource a -> IO (SimpleSource a, IO ())
Documentation
data GeneralBroadcaster x d Source #
Instances
HasSource (GeneralBroadcaster x d) x d Source # | |
Defined in Util.Broadcaster toSource :: GeneralBroadcaster x d -> Source x d Source # |
data Broadcaster x d Source #
Instances
HasSource (Broadcaster x d) x d Source # | |
Defined in Util.Broadcaster toSource :: Broadcaster x d -> Source x d Source # | |
BroadcasterClass (Broadcaster x d) (x, [d]) Source # | |
Defined in Util.Broadcaster broadcast :: Broadcaster x d -> (x, [d]) -> IO () Source # |
data SimpleBroadcaster x Source #
Instances
HasSimpleSource (SimpleBroadcaster x) x Source # | |
Defined in Util.Broadcaster toSimpleSource :: SimpleBroadcaster x -> SimpleSource x Source # | |
BroadcasterClass (SimpleBroadcaster x) x Source # | |
Defined in Util.Broadcaster broadcast :: SimpleBroadcaster x -> x -> IO () Source # | |
HasSource (SimpleBroadcaster x) x x Source # | |
Defined in Util.Broadcaster toSource :: SimpleBroadcaster x -> Source x x Source # |
newBroadcaster :: x -> IO (Broadcaster x d) Source #
newSimpleBroadcaster :: x -> IO (SimpleBroadcaster x) Source #
newGeneralBroadcaster :: x -> IO (GeneralBroadcaster x d) Source #
class BroadcasterClass broadcaster value | broadcaster -> value where Source #
Instances
BroadcasterClass (SimpleBroadcaster x) x Source # | |
Defined in Util.Broadcaster broadcast :: SimpleBroadcaster x -> x -> IO () Source # | |
BroadcasterClass (Broadcaster x d) (x, [d]) Source # | |
Defined in Util.Broadcaster broadcast :: Broadcaster x d -> (x, [d]) -> IO () Source # |
applySimpleUpdate :: SimpleBroadcaster x -> (x -> x) -> IO () Source #
applySimpleUpdate' :: SimpleBroadcaster x -> (x -> (x, y)) -> IO y Source #
applyUpdate :: Broadcaster x d -> (x -> (x, [d])) -> IO () Source #
applyGeneralUpdate :: GeneralBroadcaster x d -> (x -> (x, [d], extra)) -> IO extra Source #
switchOffSimpleSource :: SimpleSource a -> IO (SimpleSource a, IO (IO ())) Source #
Replace a SimpleSource by another which comes with a switch-off function, which temporarily blocks further updates. The action returned by the switch-off function switches the source back on again.
mirrorSimpleSource :: SimpleSource a -> IO (SimpleSource a, IO ()) Source #
Replace a SimpleSource by another which mirrors it, but only copies from it once, hopefully saving CPU time. The IO action stops the mirroring.
mirrorSimpleSourceWithDelayer :: Delayer -> SimpleSource a -> IO (SimpleSource a, IO ()) Source #
Replace a SimpleSource by another which mirrors it, but only copies from it once, hopefully saving CPU time. In addition, block all update while the Delayer is delaying things.