sixten
sixten copied to clipboard
Sanity typecheck the abstract syntax
After any pass that produces abstract syntax, right now typechecking and simplification, we should sanity typecheck it to find compiler bugs. This could perhaps only be done when using some command-line flag.
What properties should be checked?
It would be checking that the types match where they should, e.g. in function applications and case expression. It's sort of like the "main" typechecker, but since it's running on the abstract syntax where everything is explicitly typed it should be quite a bit less complicated.