Module
Yoga.Om.Rom
- Package
- purescript-yoga-om-rom
- Repository
- rowtype-yoga/purescript-yoga-om-rom
#omToEvent Source
omToEvent :: forall ctx r rl err_ err a. RowToList (exception :: Error -> Aff a | r) rl => VariantMatchCases rl err_ (Aff a) => Union err_ () (exception :: Error | err) => ctx -> { exception :: Error -> Aff a | r } -> Om ctx err a -> Event aConvert an Om computation to a Hyrule Event The event fires once when the Om completes successfully Errors are handled by the provided error handler in the context
#streamOms Source
streamOms :: forall ctx r rl err_ err a. RowToList (exception :: Error -> Aff a | r) rl => VariantMatchCases rl err_ (Aff a) => Union err_ () (exception :: Error | err) => ctx -> { exception :: Error -> Aff a | r } -> Array (Om ctx err a) -> Event aStream multiple Om computations as events Creates an event that fires for each Om that completes
#raceEvents Source
raceEvents :: forall a. Array (Event a) -> Event aRace multiple events, taking the first successful one Similar to Om's race but for events
#filterMapOm Source
filterMapOm :: forall ctx r rl err_ err a b. RowToList (exception :: Error -> Aff (Maybe b) | r) rl => VariantMatchCases rl err_ (Aff (Maybe b)) => Union err_ () (exception :: Error | err) => (a -> Om ctx err (Maybe b)) -> ctx -> { exception :: Error -> Aff (Maybe b) | r } -> Event a -> Event bFilter and map an Om computation based on event values
#foldOms Source
foldOms :: forall ctx r rl err_ err a b. RowToList (exception :: Error -> Aff b | r) rl => VariantMatchCases rl err_ (Aff b) => Union err_ () (exception :: Error | err) => (b -> a -> Om ctx err b) -> b -> ctx -> { exception :: Error -> Aff b | r } -> Event a -> Event bFold over Om computations triggered by events
#EventOmCanceller Source
type EventOmCanceller = Effect UnitA canceller for event-based Om operations
- Modules
- Test.
Main. Rom - Yoga.
Om. Rom - Yoga.
Om. Rom. Test