Skip to main content

sim_lib_pattern/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Pattern behavior for the SIM runtime over the kernel `Shape` protocol.
4//!
5//! The kernel defines the `Shape` match/binding protocol; this crate supplies
6//! the concrete pattern organ (algebraic data types, destructuring, match arms,
7//! and exhaustiveness checking) as pattern surfaces over that protocol.
8
9mod adt;
10mod claims;
11mod matching;
12mod shapes;
13
14pub use adt::{
15    AlgebraicDataType, PatternField, TaggedValue, VariantConstructor, VariantDeclaration,
16    tagged_value,
17};
18pub use claims::{
19    pattern_adt_op_key, pattern_destructure_op_key, pattern_exhaustive_op_key,
20    pattern_match_op_key, pattern_op_keys, pattern_organ_symbol, pattern_tag_op_key,
21    publish_pattern_organ_claims, publish_pattern_organ_claims_for_lib,
22};
23pub use matching::{
24    MatchArm, PatternMatch, destructure_expr, destructure_value, exhaustiveness_diagnostics,
25    match_value,
26};
27pub use shapes::{AdtShape, VariantShape};
28
29#[cfg(test)]
30mod tests;