dunai-0.3.0.0: Generalised reactive framework supporting classic, arrowized and monadic FRP.

Safe HaskellSafe
LanguageHaskell2010

Data.MonadicStreamFunction.ReactHandle

Description

ReactHandle

Synopsis

Documentation

type ReactHandle m = IORef (MSF m () ()) Source #

A storage for the current state of an MSF

reactInit :: MonadIO m => MSF m () () -> m (ReactHandle m) Source #

Needs to be called before the external main loop is dispatched

react :: MonadIO m => ReactHandle m -> m () Source #

The callback that needs to be called by the main loop at every cycle

createWormhole :: MonadIO m => a -> m (MSF m a (), MSF m () a) Source #

Creates two ends of a synchronisation wormhole