astynax/tea-combine/3.1.0

TeaCombine.Effectful.Either

Combinators for work with effectful programs (those use @Cms and @Sub).

TODO: add some great docs.

(flags -> ( model2, Cmd msg2 ))
-> (flags -> ( model1, Cmd msg1 ))
-> ( Either () ()
-> flags
-> ( Either model1 model2, Cmd (Either msg1 msg2) )
, Nonempty (Either () ())
)

Combines two inits models to selector and list of paths.

This is a first step in the "oneOfInits+[orInit]"-chain.

(flags -> ( model2, Cmd msg2 ))
-> ( path -> flags -> ( model1, Cmd msg1 ), Nonempty path )
-> ( Either path ()
-> flags
-> ( Either model1 model2, Cmd (Either msg1 msg2) )
, Nonempty (Either path ())
)

Adds an another init to the "oneOfInits+[orInit]"-chain.

Update model2 msg2
-> Update model1 msg1
-> Either msg1 msg2
-> Either model1 model2
-> ( Either model1 model2, Cmd (Either msg1 msg2) )

Updates one of two submodels using corresponding subupdate function.

Subscription model2 msg2
-> Subscription model1 msg1
-> Either model1 model2
-> Sub (Either msg1 msg2)

Combines two subscriptions.