anchor.diff:             " clauses completely covered the type "?NG"~s\n",
              [bad_pat(Pat), Type]);
   message_to_string({unmatched_return, [Type]}) ->
  -    format("Expression produces a value of type ~s,"
  +    format(?BW "Expression produces a value of type "?R"~s"?BW","
              " but this value is unmatched\n", [Type]);
   message_to_string({unused_fun, [F, A]}) ->
       format(?BW "Function "?NR"~w/~w"?BW" will never be called\n", [F, A]);
   %%----- Warnings for specs and contracts -------------------
   message_to_string({contract_diff, [M, F, _A, Contract, Sig]}) ->
  -    format("Type specification ~w:~w~s"
  -           " is not equal to the success typing: ~w:~w~s\n",
  +    format(?BW"Type specification "?R"~w:~w~s"?BW
  +           " is not equal to the success typing: "?R"~w:~w~s\n",
              [M, F, Contract, M, F, Sig]);
   message_to_string({contract_subtype, [M, F, _A, Contract, Sig]}) ->
  -    format("Type specification ~w:~w~s"
  -           " is a subtype of the success typing: ~w:~w~s\n",
  +    format(?BW"Type specification "?R"~w:~w~s"?BW
  +           " is a subtype of the success typing: "?R"~w:~w~s\n",
              [M, F, Contract, M, F, Sig]);
   message_to_string({contract_supertype, [M, F, _A, Contract, Sig]}) ->
  -    format("Type specification ~w:~w~s"
  -           " is a supertype of the success typing: ~w:~w~s\n",
  +    format(?BW"Type specification "?R"~w:~w~s"?BW
  +           " is a supertype of the success typing: "?R"~w:~w~s\n",
              [M, F, Contract, M, F, Sig]);
   message_to_string({contract_range, [Contract, M, F, ArgStrings, Line, CRet]}) ->
  -    format("The contract ~w:~w~s cannot be right because the inferred"
  -           " return for ~w~s on line ~w is ~s\n",
  +    format(?BW"The contract "?R"~w:~w~s"?BW" cannot be right because the"
  +           " inferred return for "?R"~w~s"?BW" on line "?R"~w"?BW" is "?R"~s\n",
              [M, F, Contract, F, ArgStrings, Line, CRet]);
   message_to_string({invalid_contract, [M, F, A, Sig]}) ->
       format(?BW "Invalid type specification for function" ?R " ~w:~w/~w."
              ?BW " The success typing is" ?R " ~s\n", [M, F, A, Sig]);
   message_to_string({extra_range, [M, F, A, ExtraRanges, SigRange]}) ->
  -    format("The specification for ~w:~w/~w states that the function"
  -           " might also return ~s but the inferred return is ~s\n",
  +    format(?BW"The specification for "?R"~w:~w/~w"?BW" states that the function"
  +           " might also return "?R"~s"?BW" but the inferred return is "?R"~s\n",
              [M, F, A, ExtraRanges, SigRange]);
   message_to_string({overlapping_contract, [M, F, A]}) ->
  -    format("Overloaded contract for ~w:~w/~w has overlapping domains;"
  -           " such contracts are currently unsupported and are simply ignored\n",
  -           [M, F, A]);
  +    format(?BW"Overloaded contract for "?R"~w:~w/~w"?BW" has overlapping"
  +           " domains; such contracts are currently unsupported and are simply "
  +           "ignored\n", [M, F, A]);
   message_to_string({spec_missing_fun, [M, F, A]}) ->
  -    format("Contract for function that does not exist: ~w:~w/~w\n",
  +    format(?BW"Contract for function that does not exist: "?R"~w:~w/~w\n",
              [M, F, A]);
   %%----- Warnings for opaque type violations -------------------
   message_to_string({call_with_opaque, [M, F, Args, ArgNs, ExpArgs]}) ->
  -    format("The call ~w:~w~s contains ~s when ~s\n",
  +    format(?BW"The call "?R"~w:~w~s"?BW" contains "?R"~s"?BW" when "?R"~s\n",
              [M, F, Args, form_positions(ArgNs), form_expected(ExpArgs)]);
   message_to_string({call_without_opaque, [M, F, Args, [{N,_,_}|_] = ExpectedTriples]}) ->
       format([?BW, "The call", ?R, " ~w:~w~s ", ?BW, "does not have" ?R " ~s\n"],
              [M, F, bad_arg(N, Args), form_expected_without_opaque(ExpectedTriples)]);
   message_to_string({opaque_eq, [Type, _Op, OpaqueType]}) ->
  -    format("Attempt to test for equality between a term of type ~s"
  -           " and a term of opaque type ~s\n", [Type, OpaqueType]);
  +    format(?BW"Attempt to test for equality between a term of type "?R"~s"?BW
  +           " and a term of opaque type "?R"~s\n", [Type, OpaqueType]);
   message_to_string({opaque_guard, [Arg1, Infix, Arg2, ArgNs]}) ->
  -    format("Guard test ~s ~s ~s contains ~s\n",
  +    format(?BW"Guard test "?R"~s ~s ~s"?BW" contains "?R"~s\n",
              [Arg1, Infix, Arg2, form_positions(ArgNs)]);
   message_to_string({opaque_guard, [Guard, Args]}) ->
  -    format("Guard test ~w~s breaks the opaqueness of its argument\n",
  -           [Guard, Args]);
  +    format(?BW"Guard test "?R"~w~s"?BW" breaks the opaqueness of its"
  +           " argument\n", [Guard, Args]);
   message_to_string({opaque_match, [Pat, OpaqueType, OpaqueTerm]}) ->
       Term = if OpaqueType =:= OpaqueTerm -> "the term";
                 true -> OpaqueTerm
              end,
  -    format("The attempt to match a term of type ~s against the ~s"
  -           " breaks the opaqueness of ~s\n", [OpaqueType, Pat, Term]);
  +    format(?BW"The attempt to match a term of type "?R"~s"?BW" against the"
  +           ?R" ~s"?BW" breaks the opaqueness of "?R"~s\n",
  +           [OpaqueType, Pat, Term]);
   message_to_string({opaque_neq, [Type, _Op, OpaqueType]}) ->
  -    format("Attempt to test for inequality between a term of type ~s"
  -           " and a term of opaque type ~s\n", [Type, OpaqueType]);
  +    format(?BW"Attempt to test for inequality between a term of type "?R"~s"
  +           ?BW" and a term of opaque type "?R"~s\n", [Type, OpaqueType]);
   message_to_string({opaque_type_test, [Fun, Args, Arg, ArgType]}) ->
  -    format("The type test ~s~s breaks the opaqueness of the term ~s~s\n",
  -           [Fun, Args, Arg, ArgType]);
  +    format(?BW"The type test "?R"~s~s"?BW" breaks the opaqueness of the term "
  +           ?R"~s~s\n", [Fun, Args, Arg, ArgType]);
   message_to_string({opaque_size, [SizeType, Size]}) ->
  -    format("The size ~s breaks the opaqueness of ~s\n",
  +    format(?BW"The size "?R"~s"?BW" breaks the opaqueness of "?R"~s\n",
              [SizeType, Size]);
   message_to_string({opaque_call, [M, F, Args, Culprit, OpaqueType]}) ->
  -    format("The call ~s:~s~s breaks the opaqueness of the term ~s :: ~s\n",
  -           [M, F, Args, Culprit, OpaqueType]);
  +    format(?BW"The call "?R"~s:~s~s"?BW" breaks the opaqueness of the term"?R
  +           " ~s :: ~s\n", [M, F, Args, Culprit, OpaqueType]);
   %%----- Warnings for concurrency errors --------------------
   message_to_string({race_condition, [M, F, Args, Reason]}) ->
  -    format("The call ~w:~w~s ~s\n", [M, F, Args, Reason]);
  +    format(?BW"The call "?R"~w:~w~s ~s\n", [M, F, Args, Reason]);
   %%----- Warnings for behaviour errors --------------------
   message_to_string({callback_type_mismatch, [B, F, A, ST, CT]}) ->
       format(?BW"The inferred return type of"?R" ~w/~w (~s) "?BW
  
positive.code:         both -> NameString ++ ?BW "has no local return\n" ?R
      end;
  message_to_string({record_constr, [RecConstr, FieldDiffs]}) ->
      format("Record construction ~s violates the"
             " declared type of field ~s\n", [RecConstr, FieldDiffs]);
  message_to_string({record_constr, [Name, Field, Type]}) ->
      format("Record construction violates the declared type for #~w{}"
             " since ~s cannot be of type ~s\n", [Name, Field, Type]);
  message_to_string({record_matching, [String, Name]}) ->
      format("The ~s violates the"
             " declared type for #~w{}\n", [String, Name]);
  message_to_string({record_match, [Pat, Type]}) ->
      format("Matching of ~s tagged with a record name violates the declared"
             " type of ~s\n", [Pat, Type]);
  message_to_string({pattern_match, [Pat, Type]}) ->
      format(?BW"The ~s"?BW" can never match the type "?NG"~s\n",
             [bad_pat(Pat), Type]);
  
negative.code: %%----- Warnings for general discrepancies ----------------
  message_to_string({apply, [Args, ArgNs, FailReason,
                             SigArgs, SigRet, Contract]}) ->
      format(?BW"Fun application with arguments "?R"~s ",
             [bad_arg(ArgNs, Args)]) ++
          call_or_apply_to_string(ArgNs, FailReason, SigArgs, SigRet, Contract);
  message_to_string({app_call, [M, F, Args, Culprit, ExpectedType, FoundType]}) ->
      format(?BW "The call" ?R " ~s:~s~s " ?BW "requires that"
  