Enum fungi_lang::dynamics::RtVal
source · pub enum RtVal {
}
Expand description
Run-time values. Compare to ast::Val.
Same as Val, except that these values are (1) closed and (2) may contain run time-only structures, from the Adapton entine:
-
there are no variables (“closed”) and
-
unlike values written by user in their program, run-time values may contain run-time structures, such as actual thunks and references, a la
Art
s from Adapton library.
Variants
Unit
Unit value
Pair(RtValRec, RtValRec)
Pair of run-time values
Inj1(RtValRec)
First injection of run-time value
Inj2(RtValRec)
Second injection of run-time value
Roll(RtValRec)
Rolled run-time value (with a recursive type)
NameFn(NameTm)
Dynamic name term
Nat(usize)
Natural number
Str(String)
String
Bool(bool)
Boolean
ThunkAnon(EnvRec, Exp)
Special-case thunk values: For implementing fix
with environment-passing style
Name(Name)
AST Names; we convert to Adapton engine names when we use the engine API
Ref(Ref)
Refs from Adapton engine; they each contain a run-time value
Thunk(Thk)
Thunks from Adapton engine; they each evaluate to a terminal expression
Pack(RtValRec)
Existential packings; at run-time, we forget the choice of indices
HostObj(HostObj)
“Host objects”: native Rust objects