Skip to content
Halyard
Project
Source code on Codeberg (opens in new tab)

Search

Menu

Trace Module

Inspect and record/replay the current IO trace entry (plan 179).

Functions

Trace.currentArgs

() -> [String]

The arguments of the most recent IOTrace perform, as debug strings.

See also: Trace.currentOp

Trace.currentOp

() -> String

The operation name of the most recent IOTrace perform.

See also: Trace.currentArgs

Trace.passThrough

() -> a

Run the current IOTrace operation's default interpretation — its stdlib native — and return the result. In a recorded run the operation is recorded; in a replay it is served from the log, so no IO happens either way.

Notes: This is how an arm handles SOME operations of a many-operation effect and leaves the rest alone. Without it a partial handler would have to invent a value for every operation it does not intercept.

See also: Trace.currentOp, Trace.currentArgs

Trace.recordEntry

String -> ()

Append a replay entry for the current perform (record mode).

See also: Trace.replayLookup

Trace.replayLookup

() -> String

Serve the next recorded replay entry's content (replay mode).

See also: Trace.recordEntry