[m-rev.] for post-commit review: indent.m

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed May 10 14:43:46 AEST 2023


On 2023-05-10 14:29 +10:00 AEST, "Julien Fischer" <jfischer at opturion.com> wrote:

>>          PredOrFunc = write_cast_as_pred_or_func(CastType),
>>          (
>>              PredOrFunc = pf_predicate,
>> -            Functor = term.atom(CastTypeString),
>> -            term_subst.var_list_to_term_list(ArgVars, ArgTerms),
>> -            Term = term.functor(Functor, ArgTerms, dummy_context),
>> -            write_indent(Stream, Indent, !IO),
>> -            mercury_output_term_src(VarNameSrc, VarNamePrint, Term,
>> -                Stream, !IO)
>> +            % Functor = term.atom(CastTypeString),
>> +            % term_subst.var_list_to_term_list(ArgVars, ArgTerms),
>> +            % Term = term.functor(Functor, ArgTerms, dummy_context),
>> +            % ZZZ
>> +            % io.write_string(Stream, IndentStr, !IO),
>> +            % mercury_output_term_src(VarNameSrc, VarNamePrint, Term,
>> +            %     Stream, !IO)
>> +            CallStr = functor_to_string(VarNameSrc, VarNamePrint,
>> +                term.atom(CastTypeString), ArgVars),
>> +            io.format(Stream, "%s%s",
>> +                [s(IndentStr), s(CallStr)], !IO)
> 
> What's the ZZZ for?

Originally, to remind me to replace the original code (which is
commented out in the diff above) with the code below it.
Later, to remind me to delete the replaced code. Only the first
reminder worked :-(

>> +    % Write out the given indent level (indent_increment spaces per indent).
>> +    % error_util.m
> 
> Why does it say error_util.m there?

It was another failed reminder, in this case it was for adding a comment
explaining that we use two-space indents in error_util.m and mlds_to_*.m.

> That looks fine otherwise.

Thanks for the review. I just committed fixes for both issues above.

Zoltan.


More information about the reviews mailing list