tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
    On my Mac with its old 32 bit C compiler, the hex strings generated
    as part of the output when printing c_pointers includes an initial
    minus sign. Don't let this prevent the replacement of all such
    addresses with a standard 0xXXXX.
Improve messages for errors in functor argument types.

compiler/typecheck_errors.m:
    Given a type error in X = f(Y1, ..., Yn), where the type of one or more
    of the Yi does not match the type of the corresponding argument of f,
    we have for a long time tried to print error messages that mention
    the expected/actual type mismatches only for those arguments.
    However, we used to insist on both the expected and actual types
    being uniquely known. This diff lifts that restriction, so we can
    now generate these more focused messages if e.g. the Yi is "no",
    whose type may be either bool or maybe(T).

    We now also try to suppress any mention of mismatches in which the actual
    type subsumes the expected type. This usually happens when the actual
    argument value is something like [], whose type is list(T), but the
    expected type is a list with a known element type. If there are any
    argument type mismatches for which this is not true, we print error
    messages only about them.

    Don't insist on printing the entire right hand side term on a single
    like as a fixed quoted string. For the kinds of unifications for which
    this improvement is most useful, that term won't fit on one line.

    Be more consistent aboiut putting quotes around types in error messages.

    Move a predicate next to where it is used.

compiler/prog_type.m:
    Provide a missing utility function for the new code in typecheck_errors.m.

tests/invalid/overloading.err_exp:
    Expect the error messages we now generate for this test case.
    This is only 10 lines, compared to the old 44 lines. The first 6
    of those 10 set the context, and the last 4 identify the problem
    exactly. (The motivation for this change was an error like this.)

tests/invalid/type_error_ambiguous.err_exp:
    Expect quotes around types.
Don't print type mismatches as errors if they aren't.

Suppose there is a type error in argument i of a term. If another argument j
is the variable A, and if the compiler knows that e.g. variable A's type
is either bool or maybe, (likely after having seen "A = no"), then we used
to print a message about a type mismatch not just for argument i, but for
argument j as well. If argument j's expected type was bool, we would have
printed a mismatch about A's being actual type being maybe, and vice versa.

This diff stops that. If there is a type assignment in which an arguments'
actual type matches its expected type, we don't print a misleading mismatch
message about that argument.

compiler/typecheck_errors.m:
    As above.

tests/invalid/type_error_in_arg.{m,exp}:
    A new test case to test the compiler's error messages in this situation.

tests/invalid/Mmakefile:
    Enable the new test case.
Add the predicate maybe.fold2_maybe/6 to the standard library.

Add a predicate version of ground_pseudo_type_desc_to_type_desc.

library/maybe.m:
	Add the above predicate.

	Re-order some existing declarations as per the coding standard.

library/type_desc.m:
	Add a predicate verison of ground_pseudo_type_desc_to_type_desc.

NEWS:
	Announce the above.
Fix a spelling error.

runtime/mercury_wrapper.c:
	As above.
Delete XXX from std_util interface.

library/std_util.m:
	Delete an XXX comment regarding alternative syntax for
	compose/3 from the interface to this module -- it shows
	up in the library reference manual otherwise.