[m-rev.] for review: Delete deprecated substring predicates and functions.

Mark Brown mark at mercurylang.org
Thu Nov 7 20:34:00 AEDT 2019


On Thu, Nov 7, 2019 at 3:21 PM Peter Wang <novalazy at gmail.com> wrote:
>
> library/string.m:
>     Delete long-deprecated substring/3 function and substring/4 predicate.
>     The newly introduced `string_piece' type has a substring/3 data
>     constructor which takes (start, end) offsets into the base string,
>     whereas the function and predicate take (start, count) arguments.
>     To reduce potential confusion, delete the deprecated function and
>     predicate.
>
>     Delete other deprecated substring predicates and functions as well.
>
> tests/general/Mercury.options:
> tests/general/string_foldl_substring.exp:
> tests/general/string_foldl_substring.m:
> tests/general/string_foldr_substring.exp:
> tests/general/string_foldr_substring.m:
> tests/hard_coded/Mercury.options:
> tests/hard_coded/string_substring.m:
>     Delete tests for deprecated predicates.
>
> tests/tabling/mercury_java_parser_dead_proc_elim_bug.m:
> tests/tabling/mercury_java_parser_dead_proc_elim_bug2.m:
> tests/valid/mercury_java_parser_follow_code_bug.m:
>     Replace calls to unsafe_substring with unsafe_between.
>
> NEWS:
>     Announce the changes.
> ---
>  NEWS                                          |  14 ++
>  library/string.m                              | 122 ------------------
>  tests/general/Mercury.options                 |   4 -
>  tests/general/string_foldl_substring.exp      |   8 --
>  tests/general/string_foldl_substring.m        |  24 ----
>  tests/general/string_foldr_substring.exp      |   8 --
>  tests/general/string_foldr_substring.m        |  24 ----
>  tests/hard_coded/Mercury.options              |   1 -
>  tests/hard_coded/string_substring.m           |  16 ---
>  .../mercury_java_parser_dead_proc_elim_bug.m  |   2 +-
>  .../mercury_java_parser_dead_proc_elim_bug2.m |   2 +-
>  .../mercury_java_parser_follow_code_bug.m     |   2 +-
>  12 files changed, 17 insertions(+), 210 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 80e4504d3..60c5deb16 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -443,6 +443,20 @@ Changes to the Mercury standard library:
>     - prefix(in, out)
>     - suffix(in, out)
>
> +  The following predicates and functions in the string module have been
> +  removed:

It would be good to mention that they were previously obsolete, e.g.:

"The following obsolete predicates and functions..."

Otherwise this is fine.

Mark


More information about the reviews mailing list