Expand description
EffectEvent — opaque builtin representing one recorded effect emission.
In Oracle v1’s trace API, each call to trace.event(k) returns an
Option<EffectEvent>. The event carries enough data to answer:
- “What effect method was emitted?” →
event.is(Console.print) - “What value was passed?” →
match event ... Some(Console.print(msg)) - “Is it equal to this literal?” →
trace.contains(Console.print("hi"))
User code never constructs EffectEvent directly. Three elaboration
paths in verify-trace context produce event values:
- Expression position:
Console.print("x")→ event literal. - Pattern position:
Console.print(msg)in amatcharm → destructuring. - Bare reference:
Console.print→ effect-type predicate (used withevent.is(...)and overloadedtrace.contains(...)).
Internal representation: { method: String, args: List<Value> } where
args carries the runtime values emitted, typed per the effect
method’s signature (polymorphic T for Console.print, concrete types
for classified generative effects).
Constants§
- FIELD_
ARGS - FIELD_
METHOD - FIELD_
PATH - Dewey-decimal path string identifying the structural position
where the event was emitted. Empty for sequential-level events
(outside any
!/?!group) — matches theBranchPath.rootconvention.BranchPath.parse(event.path)round-trips the value back to an opaqueBranchPath. - TYPE_
NAME
Functions§
- register
- Construct the arena type registration. Called alongside other builtin
record types from
vm::register_service_types.