Module

Zeta.Compat

This module tries to mimic purescript-signal's API, without hiding the fact that new Signals are created in the process of mapping over their value - this means that if you have dangling subscribers to the old reference, then it won't get garbage collected.

#constant

constant :: forall a. a -> Effect (Signal (read :: READ, write :: WRITE) a)

Alias for make

#map'

map' :: forall a b rw. (a -> b) -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

Creates a new signal, relaying the next incoming values from the old to the new, after transformation.

#traverse'

traverse' :: forall a b rw. (a -> Effect b) -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

Same as map, but where each transformation might be effectful.

#ap'

ap' :: forall a b rw rw1. Signal (read :: READ | rw) (a -> b) -> Signal (read :: READ | rw1) a -> Effect (Signal (read :: READ, write :: WRITE) b)

#bind'

bind' :: forall a b rw. (a -> Signal (read :: READ, write :: WRITE) b) -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

#merge

merge :: forall a rw rw1. Signal (read :: READ | rw) a -> Signal (read :: READ | rw1) a -> Effect (Signal (read :: READ, write :: WRITE) a)

#foldp

foldp :: forall a b rw. (a -> b -> b) -> b -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

#sampleOn

sampleOn :: forall a b rw rw1. Signal (read :: READ | rw) a -> Signal (read :: READ | rw1) b -> Effect (Signal (read :: READ, write :: WRITE) b)

#dropRepeats

dropRepeats :: forall a rw. Eq a => Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) a)

#runSignal

runSignal :: forall rw. Signal (read :: READ | rw) (Effect Unit) -> Effect Unit

#unwrap

unwrap :: forall a rw. Signal (read :: READ | rw) (Effect a) -> Effect (Signal (read :: READ, write :: WRITE) a)

#filter

filter :: forall a rw. (a -> Boolean) -> a -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) a)

#filterMap

filterMap :: forall a b rw. (a -> Maybe b) -> b -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

#flattenArray

flattenArray :: forall a rw. Signal (read :: READ | rw) (Array a) -> a -> Effect (Signal (read :: READ, write :: WRITE) a)

#flatten

flatten :: forall f a rw. Foldable f => Signal (read :: READ | rw) (f a) -> a -> Effect (Signal (read :: READ, write :: WRITE) a)

Modules