Wave
Wave copied to clipboard
Separate HIR traversal and type canonicalization from TypedProgram
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.