Use symbol printer when printing flow-analysis debugging info - #532
Merged
Merged
Conversation
# Conflicts: # hkmc2/shared/src/test/mlscript/deforest/eta-expansion/recursive.mls
…er-for-analysis Preserve printable flow-analysis symbols with upstream identity-based strategies and SCC bound queries, and regenerate golden outputs. Validation: ctest; hkmc2AllTests/test (all passed).
LPTK
force-pushed
the
use-symbol-printer-for-analysis
branch
from
September 18, 2026 08:42
b889f75 to
9c84b90
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Result identifiers lose UID-based uniqueness, and duplicated strategy variables acquire repeated function suffixes.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates flow-analysis identifiers to use semantic symbols and SymbolPrinter, with refreshed golden snapshots.
Changes:
- Converts
ResultIdandStratVarinto symbols. - Uses symbol-aware formatting for flow and dead-parameter diagnostics.
- Updates affected diff-test snapshots.
File summaries
| File | Description |
|---|---|
hkmc2/shared/src/main/scala/hkmc2/Uid.scala |
Removes obsolete UID handlers. |
hkmc2/shared/src/main/scala/hkmc2/codegen/flowAnalysis/FlowAnalysis.scala |
Adds symbol-backed analysis identifiers and logging. |
hkmc2/shared/src/main/scala/hkmc2/codegen/DeadParamElim.scala |
Uses SymbolPrinter in diagnostics. |
hkmc2/shared/src/main/scala/hkmc2/codegen/deforest/Rewrite.scala |
Preserves the identifier union type. |
hkmc2/shared/src/test/mlscript/codegen/ConfigDirective.mls |
Refreshes flow-analysis snapshots. |
hkmc2/shared/src/test/mlscript/deforest/basic.mls |
Refreshes deforestation snapshots. |
hkmc2/shared/src/test/mlscript/deforest/determinism.mls |
Refreshes generated identifier snapshots. |
hkmc2/shared/src/test/mlscript/deforest/erasedTypes.mls |
Refreshes generated identifier snapshots. |
hkmc2/shared/src/test/mlscript/deforest/fusibility.mls |
Refreshes symbol diagnostics. |
hkmc2/shared/src/test/mlscript/deforest/recursive.mls |
Refreshes recursive-flow snapshots. |
hkmc2/shared/src/test/mlscript/deforest/simple.mls |
Refreshes generated helper names. |
hkmc2/shared/src/test/mlscript/deforest/todos.mls |
Refreshes generated helper names. |
hkmc2/shared/src/test/mlscript/deforest/eta-expansion/basic.mls |
Refreshes eta-expansion identifiers. |
hkmc2/shared/src/test/mlscript/deforest/eta-expansion/recursive.mls |
Refreshes recursive eta-expansion identifiers. |
hkmc2/shared/src/test/mlscript/dead-param-elim/basic.mls |
Refreshes dead-parameter diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/clash.mls |
Refreshes clash diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/class-in-fun.mls |
Refreshes nested-class diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/config-flags.mls |
Refreshes configuration snapshots. |
hkmc2/shared/src/test/mlscript/dead-param-elim/dead-ref.mls |
Refreshes dead-reference diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/lambda.mls |
Refreshes lambda diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/module.mls |
Refreshes module diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/recursive.mls |
Refreshes recursive diagnostics. |
hkmc2/shared/src/test/mlscript/dead-param-elim/refresher.mls |
Refreshes rewritten-function identifiers. |
Review details
- Files reviewed: 23/23 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.