[m-rev.] for post-commiy review: formatting e.g. and replace_all_sv

Julien Fischer jfischer at opturion.com
Tue Jul 15 16:45:00 AEST 2025


On Tue, 15 Jul 2025 at 08:04, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Format "e.g." for texinfo.

...

> diff --git a/library/string.m b/library/string.m
> index 4233e0a9f..07b98c5aa 100644
> --- a/library/string.m
> +++ b/library/string.m
> @@ -1319,6 +1319,20 @@
>  :- func replace_all(string::in, string::in, string::in) = (string::uo) is det.
>  :- pred replace_all(string::in, string::in, string::in, string::uo) is det.
>
> +    % replace_all_sv(Pattern, Subst, String0, String):
> +    %
> +    % Does the exact same job as replace_all, but takes the arguments
> +    % in a different order. The advantage is that this order is easier to use
> +    % with higher order code such as
> +    %
> +    %   list.map(replace_all(Pattern, Subst), Strings0, Strings)

Don't you mean replace_all_sv in there?

> +    %
> +    % and with state variables, in code such as
> +    %
> +    %   list.map(replace_all(Pattern, Subst), !Strings)

and here?

> +    %
> +:- pred replace_all_sv(string::in, string::in, string::in, string::uo) is det.

The rest looks fine.

Julien.


More information about the reviews mailing list