Skip to main content

sim_lib_binding/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Binding behavior for the SIM runtime: lexical, dynamic, and scoped binding.
4//!
5//! The kernel defines the binding-related contracts; this crate supplies the
6//! concrete binding organ (lexical/letrec scopes, dynamic parameters, modes).
7
8mod call;
9mod cell;
10mod claims;
11mod dynamic;
12mod let_form;
13mod lexical;
14mod modes;
15mod runtime;
16
17/// Cookbook recipes for the binding organ, embedded at build time.
18pub static RECIPES: sim_cookbook::EmbeddedDir =
19    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
20
21pub use call::{BoundCall, CallArgument, CallParameter, CallSignature, Remainder};
22pub use cell::{BindingCell, BindingCellState};
23pub use claims::{
24    binding_declared_op_keys, binding_dynamic_let_op_key, binding_let_op_key,
25    binding_let_star_op_key, binding_letrec_op_key, binding_live_ops, binding_op_keys,
26    binding_organ_symbol, binding_parameterize_op_key, binding_profile_modes_op_key,
27    publish_binding_organ_claims, publish_binding_organ_claims_for_lib,
28};
29pub use dynamic::{DynamicEnv, Parameter};
30pub use let_form::LetForm;
31pub use lexical::{
32    BindingInitializer, LexicalEnv, LexicalFunction, eval_let, eval_let_star, eval_letrec,
33    lexical_function_value,
34};
35pub use modes::{BindingProfileModes, BindingScopeMode, HygieneMode};
36pub use runtime::{BindingLib, binding_exports, install_binding_lib, manifest_name};
37
38#[cfg(test)]
39mod tests;