Next: , Previous: Environment, Up: Top   [Contents][Index]


11 Diagnostic output

Mercury’s strong type-, mode-, and determinism systems impose strict requirements on Mercury programs. These systems allow the compiler to guarantee that it will catch many of the most frequent kinds of errors that programmers tend to make. This improves not just program reliability, but also programmer productivity, since finding and fixing a bug is much easier if the compiler hands you the location of at least one part of the program involved in the error on a silver platter. However, it also means that a Mercury programmer will typically have to see and act upon more error and warning messages (diagnostics) than programmers who write code in less strict languages. This is why the compiler tries hard to make each diagnostic as usable, informative and clear as it can.