WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DCE: Make analysis phase return AnalysisResult.t (Task 8 + 8b)
This completes Tasks 8 and 8b of the DCE refactor plan, making the analysis
phase fully pure - returning an immutable AnalysisResult.t with no inline logging.
Key changes:
- Add AnalysisResult module with immutable result type and issue constructors
- makeDeadIssue: pure function to create dead code issues
- Decl.report: returns issue list (includes dead module + dead value issues)
- DeadOptionalArgs.check: returns issue list instead of logging
- DeadModules.checkModuleDead: returns issue option instead of logging
- reportDead: returns AnalysisResult.t, caller logs issues
- resolveRecursiveRefs: collects all issues (optional args, incorrect annotations)
via ~issues ref instead of logging inline
Architecture after this change:
merged_view (immutable)
│
▼
reportDead (pure function, no logging)
│
▼
AnalysisResult.t (immutable)
│
▼
report (all side effects here)
0 commit comments