Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Separate HIR traversal and type canonicalization from TypedProgram

Open LunaStev opened this issue 2 months ago • 0 comments

Motivation

hir.rs combines TypedProgram storage, conversion verification, type canonicalization and AST/pattern traversal in roughly 1,050 lines. The last two responsibilities can be isolated without changing the public HIR contract.

Starting points: front/parser/src/hir.rs.

Scope

Move canonicalization and traversal into internal modules. Preserve ExpressionId/PatternId assignment, source spans, ordering and TypedProgram APIs. #720 extracted semantic type collection/numeric validation and does not own this split.

Difficulty: medium.

Completion criteria

  • [ ] Keep expression/pattern identities and visitation order unchanged.
  • [ ] Retain alias, generic, span and conversion-invariant regression coverage.
  • [ ] Avoid unnecessary public exports and semantic changes.

LunaStev avatar Sep 25 '26 12:09 LunaStev