Enum fungi_lang::ast::Val
source · pub enum Val {
}
Expand description
Value terms
Variants
Var(Var)
Unit
Pair(ValRec, ValRec)
Inj1(ValRec)
Inj2(ValRec)
Roll(ValRec)
Name(Name)
NameFn(NameTm)
Anno(ValRec, Type)
Pack(IdxTm, ValRec)
Pack an index term that describes a given value.
E.g., value pack {@1} name @1
checks against type
exists a:NmSet | a in {@1,@2}. Nm[a]
.
ThunkAnon(ExpRec)
Anonymous thunks (“ordinary” CBPV thunks).
They can be written in the source program, and unlike named (store-allocated) thunks, and closed, run-time thunks, these thunks exist in the pre-evaluation AST (not the store); also, they don’t yet have a run-time environment.
Bool(bool)
Primitive (Rust) bool
, injected into Val
type
Nat(usize)
Primitive (Rust) usize
, injected into Val
type
Str(String)
Primitive (Rust) String
, injected into Val
type
HostObj(HostObj)
A Host language (Rust) object, injected into the value space of Fungi.
See also: The HostFn
case of the Exp
type.
NoParse(String)
Trait Implementations
impl Eq for Val
impl StructuralEq for Val
impl StructuralPartialEq for Val
Auto Trait Implementations
impl !RefUnwindSafe for Val
impl !Send for Val
impl !Sync for Val
impl Unpin for Val
impl !UnwindSafe for Val
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more