[m-rev.] for post-commit review: document getopt changes

Peter Wang novalazy at gmail.com
Thu Oct 22 17:47:20 AEDT 2020


On Thu, 22 Oct 2020 17:31:18 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> Better late than never.
> 
> Zoltan.

> diff --git a/NEWS b/NEWS
> index 76b2787d3..fbb80856b 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -47,6 +47,28 @@ Changes to the Mercury standard library
>      - pred `digit_to_int/2`         (replacement: `decimal_digit_to_int/2`)
>      - pred `int_to_digit/2`         (replacement: `int_to_decimal_digit/2`)
>  
> +### Changes to the `getopt` module
> +
> +* The following predicates have been added:
> +
> +    - pred `process_options_io/6`
> +    - pred `process_options_io/7`
> +    - pred `process_options_track_io/9`
> +    - pred `process_options_userdata/8`
> +    - pred `process_options_userdata_io/10`
> +
> +    The ones whose names have an `_io` suffix do the same jobs as the
> +    corresponding predicates without the `_io` suffix, with the exception
> +    that they also have a pair of I/O state arguments that allow them
> +    to implement `file_special` options. This functionality used to be
> +    available only from the `getopt_io` module.
> +

The non io predicates have changed to return structured errors.

The _se predicates were removed. (BTW, I just noticed there are still a
few references to _se predicates in getopt.m and getopt_io.m)

There should be an item in the "Changes that may break compatibility"
section.

Peter


More information about the reviews mailing list