[m-dev.] for review: fixing formatting of HLDS dumps
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Feb 18 19:13:38 AEDT 1999
On 18-Feb-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> @@ -2036,7 +2015,9 @@
> io__write_string(" --->\n"),
> hlds_out__write_constructors(Indent, Tvarset, Ctors),
> ( { MaybeEqualityPred = yes(PredName) } ->
> - io__write_string("\n\twhere equality is "),
> + io__write_string("\n"),
> + hlds_out__write_indent(Indent),
> + io__write_string("where equality is "),
Should that be `Indent + 1' rather than `Indent'?
> Index: prog_out.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/prog_out.m,v
> retrieving revision 1.41
> diff -u -u -r1.41 prog_out.m
> --- prog_out.m 1998/12/06 23:44:36 1.41
> +++ prog_out.m 1999/02/18 06:21:08
> @@ -40,6 +40,9 @@
> :- pred prog_out__write_sym_name(sym_name, io__state, io__state).
> :- mode prog_out__write_sym_name(in, di, uo) is det.
>
> +:- pred prog_out__write_quoted_sym_name(sym_name, io__state, io__state).
> +:- mode prog_out__write_quoted_sym_name(in, di, uo) is det.
I think it might be better to just change the behaviour of
prog_out__write_sym_name. Is there ever any reason to
write out a sym_name not properly quoted?
> +prog_out__write_quoted_sym_name(qualified(ModuleSpec,Name)) -->
> + prog_out__write_module_spec(ModuleSpec),
> + io__write_string(":"),
> + term_io__write_escaped_string(Name).
> +prog_out__write_quoted_sym_name(unqualified(Name)) -->
> + term_io__write_escaped_string(Name).
You should use term_io__quote_atom(Name)
[or perhaps term_io__quote_atom(Name, next_to_graphic_token)]
rather than term_io__write_escaped_string.
> Index: table_gen.m
The modifications to that file don't belong in this change.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh at 128.250.37.3 | -- leaked Microsoft memo.
More information about the developers
mailing list