Package-level declarations

Functions

Link copied to clipboard

The tree as a Mermaid flowchart: effects as boxes, leaves as terminals, responses on the edges, and a subtree that would be drawn exactly like one already drawn shares its node.

Link copied to clipboard
fun mermaidLabel(value: Any?): String

value as text Mermaid shows as it is. Mermaid reads a label as syntax: a double quote ends a quoted label, a semicolon ends a statement, a hash opens an entity code or a comment, angle brackets open HTML, a backtick opening a label opens a Markdown string, and a pair of percent signs opens a directive. Each becomes the entity code Mermaid turns back into the character when it renders, and a line break becomes the tag Mermaid breaks lines on. An empty label is a syntax error, so it becomes a space.

Link copied to clipboard

The trace as a Mermaid sequence diagram. A handler that only passes an effect on is drawn as a relay. A handler that does anything else with it (answers it, or performs effects of its own before replying) is activated from the effect's arrival to its reply. An effect that never gets a reply, because its handler ended the run instead, leaves that handler activated and is marked with a note.