Trace
The operational trace of one run under one handler stack: what each layer asked the layer below it and what came back. A program is a value whose effects are answered by whichever handlers are applied to it, so the trace shows what one stack did with it on one run, not what the program could do; the latter is its Tree.
Observers placed between the handlers with observed record the trace, so it costs the run nothing but a log. The participants are the observers' layers in the order they were applied, then last, the handler below the last observer. calls gives the trace as nested calls, which is the shape a renderer wants.
Properties
Functions
The trace as calls: an effect's stay in one participant, from the wire that brought it in to the wire that took its reply out, with the calls the participant made meanwhile nested inside. The top-level calls are those the program made. A call that never got a reply, because its handler ended the run, is closed unanswered with its inner calls intact.
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.
The trace as text, one wire per line, for a golden file or for Trace.parse. After a header naming the format, the last participant and the layers, an effect on its way down is layer -> Class: description and a response on its way up is layer <- literal, where a literal is null, kotlin.Unit, a Boolean, a number (a Long with an L, a Float with an f), a quoted String, or {Class} description for anything else. Backslashes, line breaks and, in a String, double quotes are escaped with a backslash, so every wire is one line.