Use these functions to configure your program to run procedures.
Represents the internal state used to track running procedures.
You should store this in your application's model like so:
type alias AppModel =
{ procModel : Procedure.Program.Model AppMsg
}Update the state of running procedures.
You should add this to your application's update function like so:
update : AppMsg -> AppModel -> (AppModel, Cmd AppMsg)
update appMsg appModel =
case appMsg of
ProcedureTagger procMsg ->
Procedure.Program.update procMsg appModel.procModel
|> Tuple.mapFirst (\updated -> { appModel | procModel = updated })Get any subscriptions necessary for running procedures.
Add this to your application's subscriptions function like so:
appSubscriptions : AppModel -> Sub AppMsg
appSubscriptions appModel =
Procedure.Program.subscriptions appModel.procModelNote: You only need to use this function if you are using procedures with channels, i.e. if you have subscriptions in your procedures.
Represents the internal
Msgvalues used to track the state of a procedure.The type variable refers to the
Msgtype used by your application. You should provide a message type that wraps these values like so: