Module

Jelly.Signal

Package
purescript-jelly-signal
Repository
yukikurage/purescript-jelly-signal

#Channel Source

data Channel t0

Channel is a type that represents value input.

#Signal Source

newtype Signal a

Signal is a type that represents value output.

Instances

#ifSignal Source

ifSignal :: forall a. Signal Boolean -> a -> a -> Signal a

Use conditional Signal.

#memoSignal Source

memoSignal :: forall m a. MonadEffect m => Signal (Effect (Tuple a (Effect Unit))) -> m (Tuple (Signal a) (Effect Unit))

Memorize effective Signal value to another Signal.

#modifyChannel Source

modifyChannel :: forall m a. MonadEffect m => Channel a -> (a -> a) -> m a

Modify value in Channel, and return new value.

#modifyChannel_ Source

modifyChannel_ :: forall m a. MonadEffect m => Channel a -> (a -> a) -> m Unit

Void version of modifyChannel.

#newChannel Source

newChannel :: forall m a. MonadEffect m => a -> m (Channel a)

Make new Channel.

#newState Source

newState :: forall m a. MonadEffect m => a -> m (Tuple (Signal a) (Channel a))

Make pair of Signal and Channel.

#readChannel Source

readChannel :: forall a. Channel a -> Effect a

#readSignal Source

readSignal :: forall m a. MonadEffect m => Signal a -> m a

Read Signal value.

#runSignal Source

runSignal :: forall m. MonadEffect m => Signal (Effect (Effect Unit)) -> m (Effect Unit)

Run Effective Signal.

#subscribe Source

subscribe :: forall a. Channel a -> Signal a

Subscribe to Channel and make Signal.

#watchSignal Source

watchSignal :: forall m. MonadEffect m => Signal (Effect (Effect Unit)) -> m (Effect Unit)

Run Signal without initialization.

#writeChannel Source

writeChannel :: forall m a. MonadEffect m => Channel a -> a -> m Unit

Write value to Channel.