Specular.FRP.WeakDynamic
- Package
- purescript-specular
- Repository
- restaumatic/purescript-specular
#WeakDynamic Source
newtype WeakDynamic a
A primitive similar to Dynamic. The difference is: while Dynamic always has a value, WeakDynamic has a value always after some point, but for some time after construction it may be without value.
A Dynamic can be always converted to a WeakDynamic using weaken
.
Instances
#unWeakDynamic Source
unWeakDynamic :: forall a. WeakDynamic a -> Dynamic (Maybe a)
#changedW Source
changedW :: forall a. WeakDynamic a -> Event a
An Event that fires every time a WeakDynamic changes, with the new value.
#weaken Source
weaken :: forall a. Dynamic a -> WeakDynamic a
Convert a Dynamic to a WeakDynamic. It will have the same value as the original Dynamic, and will change whenever the original Dynamic changes.
#holdWeakDyn Source
holdWeakDyn :: forall m a. MonadFRP m => Event a -> m (WeakDynamic a)
Make a WeakDynamic that will have no value, but will acquire one when the Event fires. It will also change every time the Event fires.
#switchWeakDyn Source
switchWeakDyn :: forall a. WeakDynamic (Event a) -> Event a
Make an Event that occurs when the given WeakDynamic has a value, and the value (an Event) occurs.
#subscribeWeakDyn Source
subscribeWeakDyn :: forall m a b. MonadFRP m => (a -> Effect b) -> WeakDynamic a -> m (WeakDynamic b)
Invoke the handler immediately if the WeakDynamic has a value currently, and invoke it every time it changes, until cleanup.
#subscribeWeakDyn_ Source
subscribeWeakDyn_ :: forall m a. MonadFRP m => (a -> Effect Unit) -> WeakDynamic a -> m Unit
Invoke the handler immediately if the WeakDynamic has a value currently, and invoke it every time it changes, until cleanup.
#attachWeakDynWith Source
attachWeakDynWith :: forall a b c. (a -> b -> c) -> WeakDynamic a -> Event b -> Event c
#tagWeakDyn Source
tagWeakDyn :: forall a. WeakDynamic a -> Event Unit -> Event a
#uniqWeakDynBy Source
uniqWeakDynBy :: forall m a. MonadFRP m => (a -> a -> Boolean) -> WeakDynamic a -> m (WeakDynamic a)
Make a WeakDynamic that only changes value when the input WeakDynamic changes value, and the new value is not equal to the previous value with respect to the given equality test.
- Modules
- Control.
Monad. Cleanup - Control.
Monad. Replace - Specular.
Debug - Specular.
Dom. Browser - Specular.
Dom. Builder - Specular.
Dom. Builder. Class - Specular.
Dom. Element - Specular.
Dom. Element. Class - Specular.
Dom. Node. Class - Specular.
Dom. Widget - Specular.
Dom. Widgets. Button - Specular.
Dom. Widgets. Input - Specular.
Dom. Widgets. RadioGroup - Specular.
Dom. Widgets. Select - Specular.
FRP - Specular.
FRP. Async - Specular.
FRP. Base - Specular.
FRP. Fix - Specular.
FRP. List - Specular.
FRP. Replaceable - Specular.
FRP. WeakDynamic - Specular.
Internal. Effect - Specular.
Internal. Incremental - Specular.
Internal. Incremental. Array - Specular.
Internal. Incremental. Effect - Specular.
Internal. Incremental. Global - Specular.
Internal. Incremental. Mutable - Specular.
Internal. Incremental. MutableArray - Specular.
Internal. Incremental. Node - Specular.
Internal. Incremental. Optional - Specular.
Internal. Incremental. PriorityQueue - Specular.
Internal. Incremental. Ref - Specular.
Internal. Profiling - Specular.
Internal. Queue - Specular.
Internal. RIO - Specular.
Profiling - Specular.
Ref