Rule 137e-task-andthen-inner
Task Reduction
(137)
Comments
Rules (137) and (138) carry both silent and labelled steps out of the task that is performed first. Every step of a process is a separate reduction, and another process may take steps between any two of them: a process may be suspended at any , and the definition guarantees no more. In particular, a program cannot rely on a process running without interruption until it reaches a primitive.
TeX source
\defnrule[r:e-task-andthen-inner]
{\tk\effred{\opt{\effa}}\tk'}
{\effandThen(v,\tk)\effred{\opt{\effa}}\effandThen(v,\tk')}Tests (3)
- elm / MinimalTaskAndThenInnerTestA chained task whose first task takes steps of its own.
- elm-core / TaskOnErrorCascadeTest`Task.onError` recovers a failed `Task.andThen` chain, skipping the steps between the failure and the handler, and the recovered task can be chained further.
- elm-core / TaskOnErrorInnerTest`Task.onError` lets its task take steps before it succeeds or fails.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-task-andthen-inner] 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.