Skip to main content

Module pack

Module pack 

Source
Expand description

Pack registration: PackDef and load_registered_packs (§7.0).

Structs§

KindRow
One row of the const kind table the pack! macro emits. Authored kinds carry companion: false; auto-registered inverse companions (R-T4) carry companion: true. Companions get no type triples and therefore cannot be authored directly (the R-T17 lookup fails for them).
PackDef
Compiled result of a pack! invocation. Registered with inventory::submit!.
PackRegistration
Registration hook emitted by the pack! macro. inventory only accepts const-constructible values and PackDef carries heap data (Vec, heap SmolStr), so packs register a builder function instead; the ontology assembly invokes each builder once at load time.
PackVersion
Semantic version triple for packs and kernel compatibility.
TypeTriple
A type-triple rule: which (from_type, kind, to_type) combinations are permitted (§7.15).

Functions§

kernel_const_by_name
Resolve a kernel-constant name (as written in a kernel_const: DSL field) to its RelKindId. The closed kernel-constant list from kinds.rs.
load_registered_packs
Called once at process startup. Consumes every inventory::submit! in the linked binary and produces the effective ontology. Fails if:
rule_ids_from_source
Extract rule ids from a crepe_rules! block source. Rules are pred(args) <- body; — the id is the leading identifier of each ;-terminated rule. Deterministic; used by the pack! builder.