rsagl-frp-0.6.0.1: The RogueStar Animation and Graphics Library: Functional Reactive Programming

RSAGL.FRP.FRPModel

Description

A model of the types used by an FRP program.

Synopsis

Documentation

data Enabled Source

Instances

Capability Enabled 
RSAGL_FRP_FRPMODEL Enabled 

data Disabled Source

Instances

Capability Disabled 
RSAGL_FRP_FRPMODEL Disabled 

class RSAGL_FRP_FRPMODEL a => Capability a Source

class (RSAGL_FRP_FRPMODEL frp, Eq (ThreadIDOf frp)) => FRPModel frp Source

Associated Types

type ThreadingOf frp :: *Source

The threading capability, either Enabled or Disabled.

type ThreadIDOf frp :: *Source

The a type of the thread ID (for example, a unique integer).

type StateOf frp :: *Source

The ArrowState type.

type SwitchInputOf frp :: *Source

The type of the switch input (used in switchTerminate/switchContinue, etc)

type SwitchOutputOf frp :: *Source

The type of the switch output (used in switchTerminate/switchContinue, etc)

type InputOutputOf frp :: *Source

Access to the IO monad, either Enabled or Disabled.

type Unwrap frp :: *Source

Unwrap to get the nested Switch type.

Instances

FRPModel () 
(RSAGL_FRP_FRPMODEL m, Eq t, Capability k) => FRPModel (Switch k t s io i o m) 

type FRP1 s i o = Switch Disabled () s Enabled i o ()Source

A root-level single-threaded program. IO is enabled by default.

type FRPX t s i o = FRPContext t i o (FRP1 s i [(t, o)])Source

A root-level multi-threaded program. IO is enabled by default.

type FRPContext t i o m = Switch Enabled t (SubState (StateOf m)) (InputOutputOf m) i o mSource

A multi-threaded embedded subprogram.

type FRP1Context i o m = Switch Disabled (ThreadIDOf m) (StateOf m) (InputOutputOf m) i o mSource

A single-threaded embedded subprogram.

type IODisabled i o m = Switch (ThreadingOf m) (ThreadIDOf m) (StateOf m) Disabled i o mSource

A subprogram with IO capabilities disabled.

data Switch k t s io i o m Source

The FRPModel type that represents a switch. Consists of the following type variables.

Note: Don't pattern-match against this type directly, as it is a volatile interface. Either use a type synonym, such as SimpleSwitch, or match against the type functions in FRPModel.

  • k - See, ThreadingOf. * t - See, ThreadIDOf. * s - See, StateOf. * i - See, SwitchInputOf. * o - See, SwitchOutputOf. * m - A variable that represents switch nesting.

Instances

(RSAGL_FRP_FRPMODEL m, Eq t, Capability k) => FRPModel (Switch k t s io i o m) 
(RSAGL_FRP_FRPMODEL m, Capability k) => RSAGL_FRP_FRPMODEL (Switch k t s io i o m) 

type SimpleSwitch k t s i o m = Switch k t s Enabled i o mSource

A legacy configuration, IO capabilities enabled.