pub enum Prim1 {
Show 15 variants
Car,
Cdr,
IsNum,
IsSym,
IsNil,
IsPair,
CellNew,
CellRead,
Spawn,
Receive,
Monitor,
SpawnMonitor,
IsRaise,
RaiseValue,
IsCodeFun,
}Expand description
Grouped under one variant because every member obeys the same staging rule
(residualize if the argument is Code, otherwise compute), so the
specializer states that rule once.
Variants§
Car
Cdr
IsNum
IsSym
IsNil
IsPair
CellNew
CellRead
Spawn
Receive
Unary because the floor is; the argument is ignored.
Monitor
SpawnMonitor
Not sugar: a turn ends wherever the step budget runs out, so a separate
spawn and monitor can be parted by it, letting the child die before
the watch registers and the watcher hear noproc rather than the cause.
IsRaise
The two exceptions to the staging rule above. A raise reaches these rather than propagating past them, and neither residualizes - which is what folds an interpreter’s raise test away during compilation, leaving the emitted code to get the floor’s own discipline instead.
RaiseValue
IsCodeFun
Applying a code operator commits to the floor’s calling convention, sound only for functions the floor lifted itself. Scoped per region.