Enum fungi_lang::dynamics::RtVal [−][src]
pub enum RtVal { Unit, Pair(RtValRec, RtValRec), Inj1(RtValRec), Inj2(RtValRec), Roll(RtValRec), NameFn(NameTm), Nat(usize), Str(String), Bool(bool), ThunkAnon(EnvRec, Exp), Name(Name), Ref(Ref), Thunk(Thk), Pack(RtValRec), HostObj(HostObj), }
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
Trait Implementations
impl Display for RtVal
[src]
impl Display for RtVal
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RtVal
[src]
impl Clone for RtVal
fn clone(&self) -> RtVal
[src]
fn clone(&self) -> RtVal
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for RtVal
[src]
impl Debug for RtVal
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for RtVal
[src]
impl Eq for RtVal
impl PartialEq for RtVal
[src]
impl PartialEq for RtVal
fn eq(&self, other: &RtVal) -> bool
[src]
fn eq(&self, other: &RtVal) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RtVal) -> bool
[src]
fn ne(&self, other: &RtVal) -> bool
This method tests for !=
.
impl Hash for RtVal
[src]
impl Hash for RtVal