Module
Halogen.Query.EventSource
- Package
- purescript-halogen
- Repository
- slamdata/purescript-halogen
#EventSource Source
newtype EventSource f m
Constructors
EventSource (m { done :: m Unit, producer :: Producer (f SubscribeStatus) m Unit })
#SubscribeStatus Source
data SubscribeStatus
The status of an EventSource
subscription. When a query raised by an
EventSource
evaluates to Done
the producer will be unsubscribed from.
Constructors
Instances
#unEventSource Source
unEventSource :: forall m f. EventSource f m -> m { done :: m Unit, producer :: Producer (f SubscribeStatus) m Unit }
#interpret Source
interpret :: forall m g f. Functor m => (f ~> g) -> EventSource f m -> EventSource g m
#hoist Source
hoist :: forall n m f. Functor n => (m ~> n) -> EventSource f m -> EventSource f n
#eventSource Source
eventSource :: forall eff a m f. MonadAff (avar :: AVAR | eff) m => ((a -> Eff (avar :: AVAR | eff) Unit) -> Eff (avar :: AVAR | eff) Unit) -> (a -> Maybe (f SubscribeStatus)) -> EventSource f m
Creates an EventSource
for a callback that accepts one argument.
- The first argument is the function that attaches the listener.
- The second argument is a handler that optionally produces a value in
f
.
#eventSource' Source
eventSource' :: forall eff a m f. MonadAff (avar :: AVAR | eff) m => ((a -> Eff (avar :: AVAR | eff) Unit) -> Eff (avar :: AVAR | eff) (Eff (avar :: AVAR | eff) Unit)) -> (a -> Maybe (f SubscribeStatus)) -> EventSource f m
Similar to eventSource
but allows the attachment function to return an
action to perform when the handler is detached.
#eventSource_ Source
eventSource_ :: forall eff m f. MonadAff (avar :: AVAR | eff) m => (Eff (avar :: AVAR | eff) Unit -> Eff (avar :: AVAR | eff) Unit) -> f SubscribeStatus -> EventSource f m
Creates an EventSource
for a callback that accepts no arguments.
- The first argument is the function that attaches the listener.
- The second argument is the query to raise whenever the listener is triggered.
#eventSource_' Source
eventSource_' :: forall eff m f. MonadAff (avar :: AVAR | eff) m => (Eff (avar :: AVAR | eff) Unit -> Eff (avar :: AVAR | eff) (Eff (avar :: AVAR | eff) Unit)) -> f SubscribeStatus -> EventSource f m
Similar to eventSource_
but allows the attachment function to return an
action to perform when the handler is detached.
- Modules
- Halogen
- Halogen.
Aff - Halogen.
Aff. Driver - Halogen.
Aff. Driver. Eval - Halogen.
Aff. Driver. State - Halogen.
Aff. Effects - Halogen.
Aff. Util - Halogen.
Component - Halogen.
Component. ChildPath - Halogen.
Component. Profunctor - Halogen.
Data. OrdBox - Halogen.
Data. Prism - Halogen.
HTML - Halogen.
HTML. Core - Halogen.
HTML. Elements - Halogen.
HTML. Elements. Keyed - Halogen.
HTML. Events - Halogen.
HTML. Properties - Halogen.
HTML. Properties. ARIA - Halogen.
Query - Halogen.
Query. EventSource - Halogen.
Query. ForkF - Halogen.
Query. HalogenM - Halogen.
Query. InputF - Halogen.
VDom. Driver