Elm Exactly

Rule 188p-proc-message

TransitionsK→⟨ℓ⟩K′K\step{\opt{\ell}}K'
P(pid)=(succeed v′,s′,c)⊢c◃v′⇒v′′(s,v,M,P,sb,Q,H)→(s,v,M⋅v′′,P+{pid↦ended},sb,Q,H)\frac{\begin{array}{c}P(\pid)=(\effsucceed\,v',s',\effc)\premsep\effrecv{\effc}{v'}{v''}\end{array}}{\begin{array}{c}(s,v,M,P,\sbv,Q,H)\step{}(s,v,M\cdot v'',P+\{\pid\mapsto\pgended\},\sbv,Q,H)\end{array}}
(188)
Read it in its chapter·Permanent address: /standard/rules/p-proc-message

Comments

A process whose origin is a leaf command ends, when its task succeeds, by adding the message of its leaf (rule (169)) to the end of the queue. When the functions of the map\effmaps around the leaf give no result, the process never ends.

Referred to from

TeX source
\defnrule[r:p-proc-message]
  {P(\pid)=(\effsucceed\,v',s',\effc)\premsep\effrecv{\effc}{v'}{v''}}
  {(s,v,M,P,\sbv,Q,H)\step{}(s,v,M\cdot v'',P+\{\pid\mapsto\pgended\},\sbv,Q,H)}

Tests (4)

  • elm / MinimalTaskPerformTest
    The message of a performed task reaches update.
  • elm / OutgoingPortTuple3KeepsRunningTest
    A program that sends a 3-tuple through an outgoing port keeps running afterwards.
  • elm-core / TaskAttemptErrorTest
    `Task.attempt` delivers both outcomes to `update` in a `Platform.worker`: `Ok` with the value of a succeeding task and `Err` with the error of a failing one.
  • elm-core / TaskPerformValueTest
    `Task.perform` delivers the task's value to `update` in a `Platform.worker`, for messages that carry an `Int`, a negative `Int` or a `String`, and for a message built by a function that ignores the value.

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:p-proc-message] in its title.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.