grapefruit-frp- Functional Reactive Programming core

Safe HaskellNone



A setup describes how to initialize and finalize a reactive system.



data Setup Source

A setup describes the initialization and finalization of a reactive system. It is equivalent to an action of type IO (IO ()) which initializes the system and returns a finalization action.

The mempty method of the Monoid instance denotes a setup which does no initialization and no finalization. The mappend method sequences initialization and finalization actions.


setup :: IO (IO ()) -> SetupSource

Converts an I/O action into a setup.

fromIO :: IO () -> SetupSource

Forms an initialization-only setup from an I/O action.

run :: Setup -> IO (IO ())Source

Converts a setup into an I/O action.