Skip to main content

sim_lib_numbers_core/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! Shared substrate for scalar number domains: the number-value shape and
5//! browse table ([`value_shape`]), the shared number-literal shape and class
6//! ([`literal`]), and the scalar-domain spec, literal matcher, and op-loop
7//! installer ([`scalar`]). The canonical number-domain symbol registry and
8//! promotion-lattice documentation live in [`domains`].
9
10pub mod domains;
11pub mod literal;
12pub mod magnitude;
13pub mod scalar;
14pub mod value_shape;
15
16pub use literal::{
17    NumberLiteralClass, NumberLiteralShape, class_surface_or_symbol, shape_surface_or_symbol,
18};
19pub use magnitude::{
20    DEFAULT_MAX_ARBITRARY_MAGNITUDE_BITS, MagnitudeLimit, decimal_digits_to_bits_ceil,
21};
22pub use scalar::{
23    DomainLiteralMatcher, ScalarBinaryOp, ScalarDomainSpec, ScalarLiteralMatcher, ScalarOps,
24    ScalarReductionOp, ScalarUnaryOp, install_scalar_ops, number_domain_class_stub,
25};
26pub use value_shape::{
27    DomainNumberValueShape, NumberDomainTableSpec, assert_value_shape_symbol, number_domain_table,
28    value_shape_symbol,
29};
30
31/// Cookbook recipes for this lib, embedded at build time.
32pub static RECIPES: sim_cookbook::EmbeddedDir =
33    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
34
35#[cfg(test)]
36mod tests;