Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
The module contains the main Wire
type.
- data Wire where
- data WireState where
- type Event = Maybe
- data InhibitException
- type Output = Either SomeException
- type SF = Wire Identity
- type Time = Double
- cleanupWireState :: WireState m -> IO ()
- inhibitEx :: String -> SomeException
- initWireState :: MonadIO m => IO (WireState m)
- mkGen :: (WireState m -> a -> m (Output b, Wire m a b)) -> Wire m a b
- toGen :: Monad m => Wire m a b -> WireState m -> a -> m (Output b, Wire m a b)
Wires
A wire is a network of signal transformers.
The state of the wire.
Auxilliary types
Events are signals, which can be absent. They usually denote discrete occurences of certain events.
data InhibitException Source
Inhibition exception with an informative message. This exception is the result of signal inhibition, where no further exception information is available.
type Output = Either SomeExceptionSource
The output of a wire. When the wire inhibits, then this will be a
Left
value with an exception.
Utilities
cleanupWireState :: WireState m -> IO ()Source
Clean up wire state.
inhibitEx :: String -> SomeExceptionSource
Construct an InhibitException
wrapped in a SomeException
.
initWireState :: MonadIO m => IO (WireState m)Source
Initialize wire state.