Stop using most error flags in mercury_compile_front_end.m. compiler/mercury_compile_front_end.m: At the top levels of this predicate, stop using boolean flags that are not directly derived from the presence/absence of errors in a list of error_specs. Likewise, stop paying attention to the exit status; instead, pay attention to the things that would *cause* a nonzero exit status. compiler/post_typecheck.m: Instead of counting the NUMBER of unproven type class constraints, record the error_specs we generate for such constraints. Since a single error_spec can report any strictly positive number of unproven constraints in a context, their number will be lower, but the only test we care about is "are there unproven constraints?", and for this, the error_spec list works. compiler/typecheck.m: Record the error_spec that reports exceeding the iteration limit, to simplify the correctness argument of the code that deals with that result.