Next: , Up: Diagnostic output   [Contents][Index]


11.1 Verbose vs nonverbose messages

Making a diagnostic sufficiently informative for programmers new to Mercury does in some cases require including a significant amount of explanation. On the other hand, such explanations are not needed by programmers who are already familiar with the issues involved, and indeed for them, such explanations are usually nothing more than clutter. This is why the Mercury compiler splits such error messages into two parts. The first part just reports the facts specific to the error being reported. The second part, which is intended specifically to help programmers new to Mercury, is a generic explanation of the background needed to understand the first part. The first part is always printed, while the second part is printed only if the programmer asks for verbose error messages. This can be done using the ‘--verbose-error-messages’ compiler option. which can be abbreviated to just ‘-E’. If a compiler invocation prints any diagnostics that have a verbose component that is not printed because the user has not asked for it, the compiler will print the reminder about this fact: ‘For more information, recompile with `-E'.