Expand description
Core data types: expressions (Exp), values (Val), and
environments (Env).
The floor language is λ↑↓ as defined by base.scm in namin/pink
(Amin & Rompf, Collapsing Towers of Interpreters, POPL 2018): a
unary lambda calculus with pairs, staging operators, and a small set
of effects. The representation is nameless — the parser resolves
every identifier to an environment slot, so variables are
Exp::Var indices and binders carry no names. This module holds
only the data: the CK machine that evaluates it lives in
crate::eval, the reader in crate::parse.
Enums§
Functions§
- code
- Wrap an expression tree as a
Val::Codestaged-code value. - count_
nodes - Count Exp tree nodes — used by Val::Display for
#<code N nodes>, and by tests that need to bound compiled-ANF size. - env_new
- An empty environment.
- env_
push - Push a value onto a borrowed environment, returning a new
Env. - env_
push_ owned - Push a value onto an owned environment, returning a new
Env. - rc_exp
- Wrap an expression as a shared child node.
- rc_val
- Wrap a value as a shared child node.
- tup
- Cons two values into a
Val::Tuppair.