sim-lib-pattern 0.1.3

Shape-based pattern matching and destructuring for SIM runtime values.
Documentation
#![forbid(unsafe_code)]
#![deny(missing_docs)]
//! Pattern behavior for the SIM runtime over the kernel `Shape` protocol.
//!
//! The kernel defines the `Shape` match/binding protocol; this crate supplies
//! the concrete pattern organ (algebraic data types, destructuring, match arms,
//! and exhaustiveness checking) as pattern surfaces over that protocol.

mod adt;
mod claims;
mod dialect;
mod glob_dialect;
mod lua_dialect;
mod match_form;
mod matching;
mod runtime;
mod shapes;
mod text_vm;

pub use adt::{
    AlgebraicDataType, PatternField, TaggedValue, VariantConstructor, VariantDeclaration,
    tagged_value,
};
pub use claims::{
    pattern_adt_op_key, pattern_declared_op_keys, pattern_destructure_op_key,
    pattern_exhaustive_op_key, pattern_live_ops, pattern_match_op_key, pattern_op_keys,
    pattern_organ_symbol, pattern_tag_op_key, publish_pattern_organ_claims,
    publish_pattern_organ_claims_for_lib,
};
pub use dialect::PatternDialect;
pub use glob_dialect::{GlobPatternDialect, compile_glob_pattern};
pub use lua_dialect::{LuaPatternDialect, compile_lua_pattern};
pub use match_form::MatchForm;
pub use matching::{
    MatchArm, PatternMatch, destructure_expr, destructure_value, exhaustiveness_diagnostics,
    match_value,
};
pub use runtime::{PatternLib, install_pattern_lib, manifest_name, pattern_exports};
pub use shapes::{AdtShape, VariantShape};
pub use text_vm::{TextClass, TextLimits, TextMatch, TextOp, run_text_pattern};

/// Cookbook recipes for this lib, embedded at build time.
pub static RECIPES: sim_cookbook::EmbeddedDir =
    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));

#[cfg(test)]
mod tests;
#[cfg(test)]
mod text_tests;