WIP: A simple STG tag-inference pass
This MR addresses #16970 (closed) by adding a very simple tag-inference pass.
For comparison, we have the more-sophisticated (but more complicated)
- !4742 (closed) (simple version)
- !1472 (closed) (complex version)
To try this pass, use -dverbose-stg2stg
to see what the analysis discovers. In its current incarnation the results of the analysis are immediately discarded, so it has no effect as yet.
What is missing:
- A subsequent pass to add any missing eval's around
StgConApp
nodes, guided by the analysis. - We probably want to export the
TagSig
for top-level binders, and read it in for imported binders.