What does question II.1. mean by “identify all the places in the HMTC type checker where a contextual error in a MiniTriangle program can be flagged”?
Basically, in the contextual checker, there is a code fragment for each contextual error that implements the test needed to see if that error is present in the program being compiled or not. You are asked to find those places/code fragments because that’s the easiest way to find out what all possible contextual errors are. Now, the easiest way to find those places/code fragments, is to look for the error messages, and the easiest way to find THOSE is to look for where the monadic error reporting “commands” are used, in particular “emitErrD”. However, “emitErrD” is often used indirectly in the compiler through the convenience function “require” (and others). So you need to do some light-weight detective work. The point of the question is to: • make you familiar with the concept of contextual errors, • make you familiar with the source code of the compiler.
Related Questions
- What does it mean when GnuCash (built with g-wrap-1.9.7) crashes with an error about a wrong type of argument in hook-run-danglers-real?
- The label for my watch is red, and the value is an object of type Error, what does that mean?
- What does the error Installed hardware does not support device type xyz mean?