Safe Haskell | Safe-Infered |
---|
A BroadcasterSimpleBroadcaster is a variable SourceSimpleSource paired with its update function
- 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
HasSource (GeneralBroadcaster x d) x d |
data Broadcaster x d Source
HasSource (Broadcaster x d) x d | |
BroadcasterClass (Broadcaster x d) (x, [d]) |
data SimpleBroadcaster x Source
HasSimpleSource (SimpleBroadcaster x) x | |
BroadcasterClass (SimpleBroadcaster x) x | |
HasSource (SimpleBroadcaster x) x x |
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 whereSource
BroadcasterClass (SimpleBroadcaster x) x | |
BroadcasterClass (Broadcaster x d) (x, [d]) |
applySimpleUpdate :: SimpleBroadcaster x -> (x -> x) -> IO ()Source
applySimpleUpdate' :: SimpleBroadcaster x -> (x -> (x, y)) -> IO ySource
applyUpdate :: Broadcaster x d -> (x -> (x, [d])) -> IO ()Source
applyGeneralUpdate :: GeneralBroadcaster x d -> (x -> (x, [d], extra)) -> IO extraSource
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.