Copyright | (c) 2012 Ertugrul Soeylemez |
---|---|
License | BSD3 |
Maintainer | Ertugrul Soeylemez <es@ertes.de> |
Safe Haskell | None |
Language | Haskell2010 |
Control.Wire.Trans.Switch
Contents
Description
Switching combinators. Notice that these combinators restart time when switching.
Simple switching
Arguments
:: Monad m | |
=> Wire e m a b | Wire to start with. |
-> Wire e m a b | Wire to switch into. |
-> Wire e m a b |
Behaves like the first wire until it inhibits. Switches to the second wire as soon as the first one inhibits.
The
operator is right-associative with precedence 1.andThen
- Depends: like currently active wire.
- Inhibits: when switched to second wire and that one inhibits.
- Time: switching restarts time.
Arguments
:: Monad m | |
=> Wire e m a (Wire e m a b) | Produces a wire to switch into. |
-> Wire e m a b | Initial wire. |
-> Wire e m a b |
If the first argument wire produces a wire, switch to it immediately. If not, evolve the current wire. The second argument wire is the initial wire.
- Depends: like event wire and the currently active wire.
- Inhibits: when the currently active wire inhibits.
- Time: switching restarts time.