Module

Signal.Internal

Package
purescript-zeta
Repository
athanclark/purescript-zeta

#Signal Source

newtype Signal eff a

Constructors

#subscribe Source

subscribe :: forall a eff. (a -> Eff (ref :: REF | eff) Unit) -> Signal (ref :: REF | eff) a -> Eff (ref :: REF | eff) Unit

Add a subscribers to the set

#subscribeLight Source

subscribeLight :: forall a eff. (a -> Eff (ref :: REF | eff) Unit) -> Signal (ref :: REF | eff) a -> Eff (ref :: REF | eff) Unit

#set Source

set :: forall a eff. a -> Signal (ref :: REF | eff) a -> Eff (ref :: REF | eff) Unit

Publish a message to the set of subscribers

#get Source

get :: forall a eff. Signal (ref :: REF | eff) a -> Eff (ref :: REF | eff) a

Gets the last message published to the subscribers

#clear Source

clear :: forall a eff. Signal (ref :: REF | eff) a -> Eff (ref :: REF | eff) Unit

Removes all subscribers

#make Source

make :: forall a eff. a -> Eff (ref :: REF | eff) (Signal (ref :: REF | eff) a)

Create a signal with a starting value