Skip to main content
Next (unreleased) · docs c218d875 · core f63c1e69 · built 2026-10-26 22:39 UTC

Path Normalization

Path normalization follows Name & Reference Resolution and precedes Coherence. It rewrites resolved multi-segment paths into identity-bearing forms consumed by later stages, producing the boundary type that proves the rewrite has run. Owning crate: metel-frontend; implementation: path_normalizer.rs.

Verifiable architecture claims

Owner metel-frontend unless a requirement names another.

Requirement №1​

Multi-segment qualified paths (Expr::Path, e.g. math::sin) rewrite to Expr::ResolvedPath carrying the resolved SymbolId, producing a NormalizedModuleGraph whose fields are pub(crate), so only path_normalizer::normalize can construct one.

Implemented by (1)
  • normalize metel-frontend/src/pipeline/path_normalization/mod.rs
Tested by (4)

Known limitations​

knownLIMIT-PATH-NORMALIZATION-001 — root::/super:: are rejected in expression position when the target is declared directly in that module. root::name and super::name work through a submodule path but are rejected in expression position when name is declared directly in the root or parent module. Open record ↗