1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! AIRL IR - Core intermediate representation data structures.
//!
//! This crate defines the typed IR used throughout the AIRL system. The IR is
//! designed to be serialized to/from JSON, making it easy for AI agents to
//! generate and manipulate.
//!
//! # Example
//!
//! ```
//! use airl_ir::Module;
//!
//! let json = r#"{
//! "format_version":"0.1.0",
//! "module":{"id":"m","name":"main",
//! "metadata":{"version":"1","description":"","author":"","created_at":""},
//! "imports":[],"exports":[],"types":[],
//! "functions":[]}
//! }"#;
//! let module: Module = serde_json::from_str(json).unwrap();
//! assert_eq!(module.name(), "main");
//! ```
//!
//! # Module organization
//!
//! - [`node`] — expression and statement nodes (16 variants)
//! - [`types`] — the type system
//! - [`effects`] — the effect system
//! - [`module`] — top-level module, function, and parameter definitions
//! - [`ids`] — strongly-typed identifiers
//! - [`version`] — content-addressable module versions
//! - [`graph`] — high-level graph container with validation
//! - [`display`] — pretty-printing for debugging
//! - [`symbol`] — symbol interning helpers
/// Pretty-printers and `Display` impls for IR nodes.
/// Effect system: `Pure`, `IO`, `Fail`, `Read`, `Write`, `Allocate`, `Diverge`.
/// High-level IR graph container with JSON (de)serialization.
/// Strongly-typed identifiers: [`NodeId`], [`FuncId`], [`ModuleId`], [`TypeId`], [`Symbol`].
/// Top-level module structure: [`Module`], [`FuncDef`], [`ParamDef`], imports, exports.
/// Core IR node types (expressions, statements, control flow, patterns).
/// Lightweight symbol (string) wrapper used for names and identifiers.
/// The AIRL type system: primitives, arrays, tuples, structs, enums, generics.
/// Content-addressable versioning for modules (SHA-256 based).
// Re-export key types for convenience.
pub use Effect;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use VersionId;