-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
(Stealing text from #2150)
It would be nice to have "assertion passes" between the different passes, to verify and document the post-conditions of each pass and pre-conditions of the next, without adding more clutter to the code. Examples (due to Jukka):
We could, for example, verify that unbound types don't leak from semantic analysis, and that every name expression refers to something after semantic analysis.
In addition, currently breaking something in e.g. the semantic analysis pass, is likely to result in a seemingly unrelated error message in latter phases. Of course it cannot be completely avoided, but it can be reduced.
I don't have any concrete design in mind. My intention is that the scope, nature, design and other details are to be fleshed out in this thread. The idea is very half-baked, so I'm looking forward for your comments.